Я добавил следующую модификацию в Dockerfile:
Код: Выделить всё
RUN pip install --upgrade jupyterlab-git && \
jupyter labextension install @jupyterlab/git && \
jupyter lab clean && \
jupyter lab build
Интеграция git не работает в следующей конфигурации.
Dockerfile:
Код: Выделить всё
FROM jupyter/datascience-notebook:x86_64-python-3.11.6
WORKDIR /home/jovyan/work
COPY pyproject.toml uv.lock .python-version ./
RUN pip install uv && uv sync
RUN jupyter labextension install @jupyterlab/git && \
jupyter server extension enable --py jupyterlab_git --sys-prefix && \
jupyter lab build
ENV JUPYTER_CONFIG_DIR=/home/jovyan/.jupyter
CMD ["start-notebook.sh"]
Код: Выделить всё
services:
jupyter:
build:
context: .
dockerfile: Dockerfile
ports:
- '8080:8888'
volumes:
- ./notebooks:/home/jovyan/work/notebooks
- ./jupyter_server_config.py:/home/jovyan/.jupyter/jupyter_server_config.py
- ./.python-version:/home/dev/.jupyter/.python-version
container_name: jupyterlab
environment:
JUPYTER_ENABLE_LAB: 'yes'
Код: Выделить всё
from traitlets.config import get_config
c = get_config()
c.ServerApp.password = u'argon2:$argon2id$v=19$m=10240,t=10,p=HEREISASECRETHASHEDCODE'
c.ServerApp.token = ''
c.ServerApp.allow_password_change = False
c.ServerApp.ip = '0.0.0.0'
c.ServerApp.open_browser = False
Код: Выделить всё
[project]
name = ""
version = "0.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"jupyter-server>=2.15.0",
"jupyterlab>=4.3.4",
"jupyterlab-git>=0.50.2",
"pandas>=2.2.3",
]
Подробнее здесь: https://stackoverflow.com/questions/793 ... ntegration
Мобильная версия