forked from FridoF/PyTom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (24 loc) · 979 Bytes
/
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
FROM --platform=linux/amd64 continuumio/miniconda3
WORKDIR /app
# create pytom environment
COPY environments/pytom_py3.8_cu10.1.yaml .
RUN conda env create -f pytom_py3.8_cu10.1.yaml --name pytom_env
# activate the environment
RUN echo "source activate pytom_env" > ~/.bashrc
ENV PATH /opt/conda/envs/pytom_env/bin:$PATH
SHELL ["conda", "run", "-n", "pytom_env", "/bin/bash", "-c"]
# move required files to Docker, separately for better image caching during
# TODO: we move .git only to make sure we can do "git submodule update", definitely there is a better way
ADD .git /app/.git
ADD pytom /app/pytom
ADD tests /app/tests
ADD examples /app/examples
ADD doc /app/doc
ADD tutorials /app/doc
ADD MANIFEST.in LICENSE LICENSE.txt .gitmodules .gitignore setup.py /app/
# compile/setup pytom
RUN python3.8 setup.py install --prefix /opt/conda/envs/pytom_env
# MPI and test flags
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
ENV AM_I_IN_A_DOCKER_CONTAINER=1