-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
59 lines (45 loc) · 2.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM debian:11
ARG compile_cores=8
#update system
RUN apt-get --allow-releaseinfo-change update
RUN DEBIAN_FRONTEND=noninteractive && apt-get --yes update && apt-get --yes upgrade
RUN DEBIAN_FRONTEND=noninteractive && apt-get --yes install git sudo bash wget apt-utils xz-utils python3 python3-pip
#RUN git clone [email protected]:openmsr/openmc_install_scripts
RUN groupadd -g 1000 usr
RUN useradd -rm -u 1000 usr -G sudo -g usr -s /bin/bash \
&& sed -i '/%sudo.*ALL/a %sudo ALL=(ALL) NOPASSWD: ALL' /etc/sudoers
USER usr
WORKDIR /home/usr
#clone the install scripts and run them
#RUN git clone [email protected]:openmsr/openmc_install_scripts.git
#this is done step by step to avoid invalidating the docker cache.
COPY openmc_install_scripts/Debian11/nuclear_data-install.sh .
RUN ./nuclear_data-install.sh
COPY openmc_install_scripts/Debian11/embree-install.sh .
RUN ./embree-install.sh "$compile_cores"
COPY openmc_install_scripts/Debian11/moab-install.sh .
RUN ./moab-install.sh "$compile_cores"
COPY openmc_install_scripts/Debian11/double_down-install.sh .
RUN ./double_down-install.sh "$compile_cores"
COPY openmc_install_scripts/Debian11/dagmc-install.sh .
RUN DEBIAN_FRONTEND=noninteractive && ./dagmc-install.sh "$compile_cores"
COPY openmc_install_scripts/Debian11/openmc-install.sh .
RUN DEBIAN_FRONTEND=noninteractive && ./openmc-install.sh "$compile_cores"
#clean up a bit
RUN rm *-install.sh
RUN rm *-install.sh.done
RUN rm $HOME/openmc/nuclear_data/*.xz
RUN rm $HOME/openmc/nuclear_data/*-install.sh.done
RUN sudo pip install --no-cache-dir requests jupyterlab
#Here should be added COPYING in MSRE-data directories - probably needs meshes and h5m-files as well
#include neither cubit nor onshape can be distributed like this.
RUN mkdir msre
COPY msre_simple.h5m msre/
COPY msre_control*.h5m msre/
#COPY msre_*.py msre/
RUN mkdir example_notebooks
COPY MSRE.ipynb example_notebooks/
ENV OPENMC_CROSS_SECTIONS=/home/usr/openmc/nuclear_data/mcnp_endfb71/cross_sections.xml
#we are now ready to run the msre
EXPOSE 8888
ENTRYPOINT ["jupyter","lab","--ip=0.0.0.0","--allow-root"]