-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
47 lines (34 loc) · 1.18 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.10
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 . /gmso
WORKDIR /gmso
# Create a group and user
RUN addgroup -S anaconda && adduser -S anaconda -G anaconda
RUN apk update && apk add libarchive &&\
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 --file environment-dev.yml && \
conda activate gmso-dev && \
mamba install -c conda-forge jupyter python="$PY_VERSION" && \
python setup.py install && \
echo "source activate gmso-dev" >> \
/home/anaconda/.profile && \
conda clean -afy && \
mkdir -p /home/anaconda/data && \
chown -R anaconda:anaconda /gmso && \
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"]