Skip to content

Modernize to Ubuntu 24.04, Python 3.12, JupyterLab 4, CUDA 12 - #133

Open
Avesh-code wants to merge 1 commit into
ml-tooling:mainfrom
Avesh-code:modernize-ubuntu-24.04
Open

Avesh-code wants to merge 1 commit into
ml-tooling:mainfrom
Avesh-code:modernize-ubuntu-24.04

Conversation

@Avesh-code

Copy link
Copy Markdown

This brings ml-workspace from its 2021 baseline to current versions, and fixes everything that came
up when building and running the result end to end. It's one large commit; I'm happy to split it
into smaller PRs (e.g. modernization first, then nested Docker) if that's easier to review.

What's in it

  • Platform: Ubuntu 24.04, Python 3.12 (Miniforge instead of Miniconda, avoiding Anaconda's
    licensing), JupyterLab 4 / Notebook 7, CUDA 12.6 + cuDNN 9, Node 24, current ML libraries.
    Packages with no maintained release were dropped or replaced by their successors.
    Full version table and build fixes: UPDATE.md.
  • Workspace fixes: tooling extension ported to jupyter_server; launcher tiles for the tools
    (JupyterLab 4 has no nbextensions); code-server 4 behind /tools/vscode/; Jupyter and VS Code run
    as a real user named after WORKSPACE_AUTH_USER; noVNC 1.7 fixes; OMP_NUM_THREADS from the
    cgroup v2 CPU limit.
  • Nested Docker: a Docker Engine inside the workspace that works unprivileged on Kubernetes or
    under sysbox (DOCKER_IN_DOCKER.md).
  • Running behind JupyterHub 5: port, login-cookie and base-URL fixes; no effect when standalone.
  • CHANGE.md lists every change; BUILD.md describes building both images.

Behaviour changes to be aware of

  • Notebook 6 nbextensions are gone (Notebook 7); some old extensions were dropped (see UPDATE.md).
  • / now opens the VNC desktop instead of Jupyter.
  • VNC_PW="" now disables the VNC password (VNC is bound to localhost and reached via the
    authenticated nginx proxy); unset still means the default password.
  • Jupyter/VS Code run as the WORKSPACE_AUTH_USER user rather than root.

Testing

  • Full build of the CPU (full) and GPU flavors; the CPU image started and all supervisor services
    ran; JupyterLab, VS Code and the VNC desktop used in a browser.
  • GPU image run on NVIDIA L40S (driver 570) under Kubernetes with nvidia-smi working; nested
    docker run working inside the workspace.
  • Not tested: the minimal and light flavors, docker run --gpus in nested Docker, and the
    optional installer scripts under resources/tools/.

…sted Docker and Kubernetes use

Brings the workspace from its 2021 baseline to current versions and fixes
everything found by building and running it end to end. Details:
UPDATE.md (modernization), CHANGE.md (all changes), BUILD.md (building),
DOCKER_IN_DOCKER.md (nested Docker).

Platform
- Ubuntu 20.04 -> 24.04, Python 3.8 -> 3.12 (Miniforge instead of
  Miniconda), JupyterLab 3 -> 4, Notebook 6 -> 7, CUDA 11.2 -> 12.6 with
  cuDNN 9, Node 24, current ML libraries; packages with no maintained
  release dropped or replaced by their successors.
- Build fixes for 24.04: apt sources wiped by clean-layer.sh, removed
  packages, git:// clones, changed archive formats, sslh --ssl -> --tls,
  removed pip/spaCy options, GPU flavor cuDNN/OpenBLAS packages.

Workspace
- Tooling Jupyter extension ported to jupyter_server; launcher tiles for
  VS Code, VNC, Ungit, Filebrowser, Netdata, Glances (jupyter_app_launcher).
- VS Code (code-server 4) behind the /tools/vscode/ proxy: asset routing and
  WebSocket Host header fixes.
- Jupyter and VS Code run as a real Linux user named after
  WORKSPACE_AUTH_USER, with sudo; working oh-my-zsh and pyenv.
- noVNC 1.7 fixes; VNC desktop as the landing page with Chrome and
  shortcuts; VNC_PW="" disables the VNC password (VNC and noVNC bound to
  localhost); a stuck-password bug fixed.
- login.log / history_audit.log for auditing; nginx no longer fails to
  start on bad /workspace permissions.
- OMP_NUM_THREADS follows the container's CPU limit on cgroup v2.

Nested Docker
- Full Docker Engine inside the workspace: fuse-overlayfs (CPU) or vfs (GPU,
  keeps `docker run --gpus` working), bridge and address pool moved off
  172.17.0.0/16, correct --default-address-pool flag.
- Runs unprivileged on Kubernetes (capabilities + cgroup v2 setup) or under
  sysbox with docker compose.

Running behind JupyterHub (no effect standalone)
- jupyterhub client pinned to 5.x; jupyterhub-singleuser moved off sslh's
  port; nginx's tool login check works with JupyterHub >= 4.1 cookies and no
  longer loops; launcher links follow the base URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant