-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
50 lines (35 loc) · 1.27 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
ARG PY_VERSION=3.9
FROM continuumio/miniconda3:4.10.3-alpine AS builder
EXPOSE 8888
LABEL maintainer.name="mosdef_gomc"\
maintainer.url="https://github.com/GOMC-WSU/MoSDeF-GOMC"
ENV PATH /opt/conda/bin:$PATH
USER root
ADD . /mosdef_gomc
WORKDIR /mosdef_gomc
# Create a group and user
RUN addgroup -S anaconda && adduser -S anaconda -G anaconda
# install the libarchive package needed by mamba
RUN apk update && apk add libarchive
RUN conda update conda -yq && \
conda config --set always_yes yes --set changeps1 no && \
. /opt/conda/etc/profile.d/conda.sh && \
sed -i -E "s/python.*$/python="$(PY_VERSION)"/" environment.yml && \
conda install -c conda-forge mamba && \
mamba env create --file environment.yml && \
conda activate mosdef_gomc && \
mamba install -c conda-forge nomkl jupyter python="$PY_VERSION" && \
python setup.py install && \
echo "source activate mosdef_gomc" >> \
/home/anaconda/.profile && \
conda clean -afy && \
mkdir -p /home/anaconda/data && \
chown -R anaconda:anaconda /mosdef_gomc && \
chown -R anaconda:anaconda /opt && \
chown -R anaconda:anaconda /home/anaconda
WORKDIR /home/anaconda
COPY devtools/docker-entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh
USER anaconda
ENTRYPOINT ["/entrypoint.sh"]
CMD ["jupyter"]