test: Isolation jupyter env

This commit is contained in:
tao.chen
2026-08-05 18:59:33 +08:00
parent d5de1a63d4
commit c4529782b5
7 changed files with 37 additions and 629 deletions
+8 -4
View File
@@ -12,13 +12,17 @@ RUN mkdir -p /root/.jupyter/custom /app/.venv/share/jupyter/custom && \
echo '#top-panel, #top-panel-wrapper, .jp-Notebook-header, .jp-FileEditorHeader {display: none !important; height: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important; position: absolute !important; pointer-events: none !important; }' > /root/.jupyter/custom/custom.css && \
cp /root/.jupyter/custom/custom.css /app/.venv/share/jupyter/custom/custom.css
RUN uv venv --python 3.12 /opt/venv/python3.12 && \
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.12/bin/python -r runtime/requirements-py312 && \
/opt/venv/python3.12/bin/python -m ipykernel install --prefix=/opt/venv/python3.12 --name=python312 --display-name="python3.12"
RUN uv venv --python 3.8 /opt/venv/python3.8 && \
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.8/bin/python ipykernel && \
/opt/venv/python3.8/bin/python -m ipykernel install --prefix=/app/.venv --name=python38 --display-name="python3.8"
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.8/bin/python -r runtime/requirements-py38 && \
/opt/venv/python3.8/bin/python -m ipykernel install --prefix=/opt/venv/python3.12 --name=python38 --display-name="python3.8"
RUN uv venv --python 3.10 /opt/venv/python3.10 && \
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.10/bin/python ipykernel && \
/opt/venv/python3.10/bin/python -m ipykernel install --prefix=/app/.venv --name=python310 --display-name="python3.10"
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.10/bin/python -r runtime/requirements-py310 && \
/opt/venv/python3.10/bin/python -m ipykernel install --prefix=/opt/venv/python3.12 --name=python310 --display-name="python3.10"
EXPOSE 8000
CMD ["uv", "run", "--frozen", "--package", "runtime", "gunicorn", "--config", "runtime/gunicorn.conf.py", "runtime.main:app"]