-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
60 lines (51 loc) · 2.01 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
60
# Definition of the Docker image with PyPEEC and Jupyter.
#
# Thomas Guillod - Dartmouth College
# Mozilla Public License Version 2.0
# definition of the base image
FROM quay.io/jupyter/base-notebook:2024-11-25
# image metadata
LABEL org.opencontainers.image.authors="Thomas Guillod <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/otvam/pypeec"
LABEL org.opencontainers.image.documentation="https://pypeec.otvam.ch"
LABEL org.opencontainers.image.title="PyPEEC - 3D Quasi-Magnetostatic Solver"
LABEL org.opencontainers.image.description="Docker image with PyPEEC and Jupyter"
LABEL org.opencontainers.image.licenses="MPL-2.0 and others"
# install all the dependencies (but not PyPEEC)
RUN mamba install --yes --channel conda-forge \
scilogger==1.2.3=pyhd8ed1ab_0 \
scisave==1.4.3=pyhd8ed1ab_0 \
jsonschema==4.23.0=pyhd8ed1ab_0 \
numpy==2.1.3=py312h58c1407_0 \
scipy==1.14.1=py312h62794b6_1 \
joblib==1.4.2=pyhd8ed1ab_0 \
vtk==9.3.1=osmesa_py312h838d114_109 \
pyvista==0.44.2=pyhd8ed1ab_0 \
shapely==2.0.6=py312h391bc85_2 \
rasterio==1.4.2=py312h8cae83d_1 \
pillow==11.0.0=py312h7b63e92_0 \
matplotlib-base==3.9.2=py312hd3ec401_2 \
jupyterlab==4.3.1=pyhff2d567_0 \
jupyter-server-proxy==4.4.0=pyhd8ed1ab_0 \
ipywidgets==8.1.5=pyhd8ed1ab_0 \
trame-vtk==2.8.12=pyhbc30e4a_0 \
trame-vuetify==2.7.2=pyhff2d567_0 \
trame==3.7.0=pyhd8ed1ab_0 \
ipympl=0.9.4=pyhd8ed1ab_0
# install PyPEEC (no-deps as everything required has been installed)
RUN mamba install --yes --no-deps --channel conda-forge pypeec
# clean mamba and fix permissions
RUN mamba clean --all --force-pkgs-dirs --yes
RUN fix-permissions "${CONDA_DIR}"
RUN fix-permissions "${HOME}"
# extract the PyPEEC examples
RUN pypeec examples .
# clean the workspace
RUN rm -rf *.py
RUN rm -rf *.sh
RUN rm -rf work
# allow Jupyter to display VTK graphics
ENV PYVISTA_TRAME_SERVER_PROXY_PREFIX="/proxy/"
# ensure that the working directory and folder are correct
USER ${NB_UID}
WORKDIR ${HOME}