2022-08-17 13:53:57 +01:00
|
|
|
FROM python:buster as build
|
|
|
|
|
|
|
|
RUN apt update && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
pip install virtualenv && \
|
|
|
|
virtualenv /v
|
|
|
|
|
|
|
|
RUN . /v/bin/activate && \
|
|
|
|
pip install \
|
2022-10-24 13:57:11 +01:00
|
|
|
--no-cache-dir \
|
|
|
|
-U \
|
|
|
|
jupyterlab \
|
|
|
|
notebook \
|
|
|
|
voila \
|
|
|
|
jupyterlab-git \
|
|
|
|
nodeenv && \
|
2022-08-17 13:53:57 +01:00
|
|
|
nodeenv -p
|
|
|
|
|
|
|
|
FROM python:slim as run
|
|
|
|
|
2022-10-24 13:57:11 +01:00
|
|
|
RUN apt update && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
apt install -no-install-recommends -y \
|
|
|
|
git
|
|
|
|
|
2022-08-17 13:53:57 +01:00
|
|
|
COPY --from=build /v /v
|
|
|
|
|
|
|
|
RUN mkdir /data /root/.jupyter
|
|
|
|
COPY entrypoint.sh /e
|
|
|
|
COPY conf.py /.default.py
|
|
|
|
|
|
|
|
WORKDIR /data
|
|
|
|
VOLUME /data
|
|
|
|
VOLUME /root/.jupyter
|
2022-08-17 16:43:44 +01:00
|
|
|
VOLUME /v/share/jupyter/lab
|
2022-08-17 13:53:57 +01:00
|
|
|
|
|
|
|
EXPOSE 8888
|
|
|
|
ENTRYPOINT ["/e"]
|
|
|
|
CMD ["jupyter-lab"]
|
|
|
|
|