Compare commits

...

2 Commits

Author SHA1 Message Date
b931eacf31 switched jupyter image to Debian
All checks were successful
CI / Build Jupyter python Docker images (push) Successful in 5m47s
2024-09-02 20:11:04 +08:00
fbc3671444 added ai plugin to Jupyterhub 2024-09-02 20:10:55 +08:00

View File

@@ -1,11 +1,12 @@
FROM alpine:3.19 AS build FROM debian:stable AS build
RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apk update &&\ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apk add python3 python3-dev pipx gcc g++ musl-dev linux-headers libffi-dev cargo cmake autoconf apt update &&\
RUN adduser jovyan -u 1000 --system -s /bin/sh -h /home/jovyan apt install -y python3 python3-dev pipx gcc g++ linux-headers-amd64 libffi-dev cargo cmake autoconf swig ninja-build patchelf meson python3-faiss
RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan
USER jovyan USER jovyan
WORKDIR /home/jovyan WORKDIR /home/jovyan
RUN python -m venv venv RUN python3 -m venv venv
RUN venv/bin/pip install solders RUN venv/bin/pip install solders
RUN venv/bin/pip install solana RUN venv/bin/pip install solana
RUN venv/bin/pip install numpy RUN venv/bin/pip install numpy
@@ -17,14 +18,19 @@ RUN venv/bin/pip install notebook
RUN venv/bin/pip install ipywidgets RUN venv/bin/pip install ipywidgets
RUN venv/bin/pip install jupyterlab-lsp RUN venv/bin/pip install jupyterlab-lsp
RUN venv/bin/pip install python-lsp-server[yapf,rope,pyflakes] RUN venv/bin/pip install python-lsp-server[yapf,rope,pyflakes]
# RUN venv/bin/pip install --no-binary :all: faiss-cpu
RUN venv/bin/pip install jupyter-ai
RUN venv/bin/pip install langchain-openai
#RUN venv/bin/pip install pylsp-mypy #RUN venv/bin/pip install pylsp-mypy
ENV PATH="/home/jovyan/venv/bin/:$PATH" ENV PATH="/home/jovyan/venv/bin/:$PATH"
FROM alpine:3.19 FROM debian:stable
RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apk update &&\ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apk add python3 apt update &&\
RUN adduser jovyan -u 1000 --system -s /bin/sh -h /home/jovyan apt install -y python3
RUN adduser -u 1000 --system --shell /bin/sh --home /home/jovyan jovyan
USER jovyan USER jovyan
COPY --from=build /home/jovyan /home/jovyan COPY --from=build /home/jovyan /home/jovyan
COPY jupyter_server_config.py docker_healthcheck.py /etc/jupyter/ COPY jupyter_server_config.py docker_healthcheck.py /etc/jupyter/