added jupyterhub ganymede image

This commit is contained in:
2024-05-18 21:51:08 +08:00
parent 67e860c2f4
commit 9e3f375f30
6 changed files with 241 additions and 0 deletions

31
jupyter-python/Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
FROM alpine:3.19 AS build
RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \
apk update &&\
apk add python3 python3-dev pipx gcc musl-dev linux-headers
RUN adduser luser --system -s /bin/sh -h /var/lib/jupyter
USER luser
WORKDIR /var/lib/jupyter
RUN pipx install jupyter-core
RUN pipx inject jupyter-core jupyterlab
RUN pipx inject jupyter-core ipywidgets
RUN pipx inject jupyter-core jupyterlab-lsp
RUN pipx inject jupyter-core python-lsp-server[yapf,rope,pyflakes]
RUN pipx inject jupyter-core pylsp-mypy
RUN pipx inject jupyter-core matplotlib
RUN pipx inject jupyter-core numpy
FROM alpine:3.19
RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \
apk update &&\
apk add python3 texlive texlive-xetex texlive-full
RUN adduser luser --system -s /bin/sh -h /var/lib/jupyter
USER luser
WORKDIR /var/lib/jupyter
COPY --from=build /var/lib/jupyter /var/lib/jupyter
ENV PATH="/var/lib/jupyter/.local/bin/:$PATH"
ENTRYPOINT ["jupyter", "lab", "--no-browser", "--ip=0.0.0.0"]
EXPOSE 8888/tcp