Skip to content

Commit 6e4d565

Browse files
authored
Update dockerimage information and entrypoint (mosdef-hub#943)
* Update dockerimage information and entrypoint While working with the latest mbuild docker image, I noticed that the entrypoint script would fail due to an incorrect conda environement name. I also noticed in some cases where python would be updated to 3.9 instead of being fixed at 3.7. I think it is due to the second line where we install jupyter with nomkl after we create the environment with the environment.yml file. These have been updated and fixed now. * Fix incorrect syntax for python version * Use proper variable expansion for docker
1 parent 6295254 commit 6e4d565

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Dockerfile

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM continuumio/miniconda3:4.8.2-alpine AS builder
44
EXPOSE 8888
55

66
LABEL maintainer.name="mosdef-hub"\
7-
maintainer.url="https://mosdef.org"
7+
maintainer.url="https://mosdef.org"
88

99
ENV PATH /opt/conda/bin:$PATH
1010

@@ -15,21 +15,21 @@ ADD . /mbuild
1515
WORKDIR /mbuild
1616

1717
RUN conda update conda -yq && \
18-
conda config --set always_yes yes --set changeps1 no && \
19-
. /opt/conda/etc/profile.d/conda.sh && \
20-
sed -i -E "s/python.*$/python="$(PY_VERSION)"/" environment-dev.yml && \
18+
conda config --set always_yes yes --set changeps1 no && \
19+
. /opt/conda/etc/profile.d/conda.sh && \
20+
sed -i -E "s/python.*$/python="$(PY_VERSION)"/" environment-dev.yml && \
2121
conda install -c conda-forge mamba && \
22-
mamba env create nomkl --file environment-dev.yml && \
23-
conda activate mbuild-dev && \
24-
mamba install -c conda-forge nomkl jupyter && \
25-
python setup.py install && \
26-
echo "source activate mbuild-dev" >> \
27-
/home/anaconda/.profile && \
28-
conda clean -afy && \
29-
mkdir /home/anaconda/data && \
30-
chown -R anaconda:anaconda /mbuild && \
31-
chown -R anaconda:anaconda /opt && \
32-
chown -R anaconda:anaconda /home/anaconda
22+
mamba env create nomkl --file environment-dev.yml && \
23+
conda activate mbuild-dev && \
24+
mamba install -c conda-forge nomkl jupyter python="$PY_VERSION" && \
25+
python setup.py install && \
26+
echo "source activate mbuild-dev" >> \
27+
/home/anaconda/.profile && \
28+
conda clean -afy && \
29+
mkdir /home/anaconda/data && \
30+
chown -R anaconda:anaconda /mbuild && \
31+
chown -R anaconda:anaconda /opt && \
32+
chown -R anaconda:anaconda /home/anaconda
3333

3434

3535
WORKDIR /home/anaconda

devtools/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. /opt/conda/etc/profile.d/conda.sh
44
conda activate base
5-
conda activate mbuild-docker
5+
conda activate mbuild-dev
66

77
if [ "$@" == "jupyter" ]; then
88
jupyter notebook --no-browser --notebook-dir /home/anaconda/data --ip="0.0.0.0"

0 commit comments

Comments
 (0)