forked from mosdef-hub/mbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 1.16 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
ARG PY_VERSION=3.8
FROM continuumio/miniconda3:4.10.3-alpine AS builder
EXPOSE 8888
LABEL maintainer.name="mosdef-hub"\
maintainer.url="https://mosdef.org"
ENV PATH /opt/conda/bin:$PATH
USER root
ADD . /mbuild
WORKDIR /mbuild
# Create a group and user
RUN addgroup -S anaconda && adduser -S anaconda -G anaconda
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-dev.yml && \
conda install -c conda-forge mamba && \
mamba env create nomkl --file environment-dev.yml && \
conda activate mbuild-dev && \
mamba install -c conda-forge nomkl jupyter python="$PY_VERSION" && \
python setup.py install && \
echo "source activate mbuild-dev" >> \
/home/anaconda/.profile && \
conda clean -afy && \
mkdir -p /home/anaconda/data && \
chown -R anaconda:anaconda /mbuild && \
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"]