-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.Docker
39 lines (29 loc) · 1.04 KB
/
local.Docker
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
FROM jupyter/minimal-notebook
SHELL ["/bin/bash", "--login", "-c"]
# Create output director
RUN mkdir "output"
# Create the environment:
COPY environment.yml .
RUN conda env create --file environment.yml
# Make RUN commands use the new environment:
RUN source /opt/conda/etc/profile.d/conda.sh && \
conda activate CiS2021-hackathon-environment && \
yggconfig && \
ygginfo --verbose && \
yggcompile c cpp fortran
RUN echo "source activate CiS2021-hackathon-environment" > ~/.bashrc
VOLUME /home/${NB_USER}/work
# Copy the files
WORKDIR /home/${NB_USER}/work
COPY input /home/${NB_USER}/work/input
COPY meshes /home/${NB_USER}/work/meshes
COPY models /home/${NB_USER}/work/models
COPY yamls /home/${NB_USER}/work/yamls
COPY solutions /home/${NB_USER}/work/solutions
COPY *.ipynb /home/${NB_USER}/work
RUN mkdir "/home/${NB_USER}/work/output"
RUN fix-permissions "/home/${NB_USER}/work/output" && fix-permissions "/home/${NB_USER}/work/models"
COPY launch_local.sh .
# /home/${NB_USER}/work
EXPOSE 8888
ENTRYPOINT ["/bin/bash", "launch_local.sh"]