forked from modsim/mycelyso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (29 loc) · 1.32 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
FROM continuumio/miniconda3:4.9.2-alpine
LABEL maintainer [email protected]
USER root
ENV PATH "$PATH:/opt/conda/bin:/bin/sbin:/usr/bin"
COPY . /tmp/package
RUN \
wget https://github.com/modsim/mycelyso-inspector/archive/main.tar.gz -O - | tar zx -C /tmp && \
# conda build needs bash
apk add --no-cache bash git && \
conda install -c conda-forge conda-build conda-verify && \
conda build -c conda-forge -c modsim /tmp/mycelyso-inspector-main/recipe && \
conda build -c conda-forge -c modsim /tmp/package/recipe && \
conda install -c conda-forge -c modsim -c local -y python==3.7 jupyter mycelyso mycelyso-inspector && \
mv /tmp/package/examples / && \
rm -rf /tmp/package && \
busybox adduser --disabled-password user && \
ln -s /examples /home/user && \
mkdir /data && \
chown -R user:users /data /examples /home/user && \
su -s /bin/sh user -c "jupyter notebook --generate-config" && \
echo "c.NotebookApp.ip = '0.0.0.0'" >> /home/user/.jupyter/jupyter_notebook_config.py && \
echo "c.NotebookApp.notebook_dir = '/home/user'" >> /home/user/.jupyter/jupyter_notebook_config.py && \
conda clean -afy || true && \
# conda build purge-all && \ # keep the package in the Docker image
echo Done
USER user
WORKDIR /data
EXPOSE 8888
ENTRYPOINT ["python", "-m", "mycelyso"]