Sign inSign up

melvindave/ai-devbox

By melvindave

•Updated 4 days ago

GPU-ready PyTorch 2.8 + CUDA 12.8 devbox w/ JupyterLab, Codex, Claude Code, Pi, Grok, Cursor, Devin

Image
Machine learning & AI
0

454

melvindave/ai-devbox repository overview

⁠AI Devbox

A GPU development container with six coding agents, JupyterLab, and the CUDA toolchain, for RunPod and local NVIDIA GPUs.

⁠Docker image

melvindave/ai-devbox:1.2.0                              # short semantic
melvindave/ai-devbox:1.2.0-cu1281-torch280-ubuntu2404-coding-agents   # full, immutable

Tags follow the base image's convention: release version, then CUDA 12.8.1, PyTorch 2.8.0, Ubuntu 24.04, then coding-agents for the feature that distinguishes this image from a plain PyTorch one. There is deliberately no latest, so an upgrade is always an explicit choice.

Built on RunPod's official PyTorch base, runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404, so RunPod pod conventions — the /start.sh entrypoint, JupyterLab, SSH via $PUBLIC_KEY, and caches pointed at the persistent volume — work out of the box.

From the base

OSUbuntu 24.04
Python3.12 default; 3.9–3.13 available
PyTorch2.8.0+cu128, with torchvision and torchaudio
Triton3.4.0
CUDA12.8.1 devel toolchain (nvcc) and cuDNN 9.8 dev headers
OtherNumPy, JupyterLab 4.4.9, uv, nginx, sshd, filebrowser, tmux

Added by this image

  • Coding agents: OpenAI Codex CLI, Claude Code, Pi Coding Agent, Grok Build CLI, Cursor CLI, Herdr
  • Node.js 22, plus pnpm, tsx and typescript
  • hf CLI with the hf_transfer and hf_xet extras
  • nvtop 3.3.2 (built from source) and gpustat
  • ripgrep, fd-find, git-lfs, htop, less, tree

Not included: no inference engine (llama.cpp, exllamav3, vLLM) and no model libraries (transformers, datasets, accelerate). This is a generic GPU runtime; install what a project needs at a revision it controls.

⁠Run

The default command is /start.sh, which starts JupyterLab when JUPYTER_PASSWORD is set, configures SSH when PUBLIC_KEY is set, and then keeps the container alive. It does not open a shell.

⁠With JupyterLab
docker run -d --name ai-devbox --gpus all \
  -e JUPYTER_PASSWORD='choose-a-secret' \
  -p 8888:8888 \
  -v "$PWD:/workspace" \
  -v ai-devbox-codex:/root/.codex \
  -v ai-devbox-claude:/root/.claude \
  -v ai-devbox-pi:/root/.pi \
  -v ai-devbox-cursor:/root/.cursor \
  -v ai-devbox-grok:/root/.grok \
  melvindave/ai-devbox:1.2.0

Open http://localhost:8888/lab?token=choose-a-secret, or browse to http://localhost:8888 and paste the value into the Password or token field. Despite the variable's name it is passed to Jupyter as --IdentityProvider.token. If JUPYTER_PASSWORD is unset, JupyterLab does not start, so the server is never reachable without a token.

Get a shell in the running container:

docker exec -it ai-devbox bash
⁠Shell only, no JupyterLab
docker run --rm -it --gpus all \
  -v "$PWD:/workspace" \
  melvindave/ai-devbox:1.2.0 bash

The trailing bash replaces /start.sh.

The named volumes keep agent configuration and login state across container recreation.

⁠On RunPod

  • Container image: melvindave/ai-devbox:1.2.0
  • Expose HTTP Ports: 8888
  • Environment variables: set JUPYTER_PASSWORD
  • Volume mount path: /workspace

RunPod serves JupyterLab at https://<podid>-8888.proxy.runpod.net.

⁠Verify installed software

nvidia-smi
gpustat
nvtop

python --version
node --version
hf version
codex --version
claude --version
pi --version
grok --version
cursor-agent --version
herdr --version

⁠GPU verification

python - <<'PY'
import torch

print("PyTorch:", torch.__version__)
print("CUDA runtime:", torch.version.cuda)
print("CUDA available:", torch.cuda.is_available())

if torch.cuda.is_available():
    print("GPU:", torch.cuda.get_device_name(0))
    print(
        "VRAM GiB:",
        round(torch.cuda.get_device_properties(0).total_memory / 1024**3, 2),
    )
PY

Expected: PyTorch 2.8.0+cu128, CUDA 12.8, Triton 3.4.0, Python 3.12.

⁠Downloading models

HF_HOME is /workspace/.cache/huggingface, so downloads land on the mounted volume rather than in the container layer:

hf download Qwen/Qwen3-8B --local-dir /workspace/models/qwen3-8b

The base also sets HF_HUB_ENABLE_HF_TRANSFER=1 and HF_XET_HIGH_PERFORMANCE=1; this image installs the matching hf_transfer and hf_xet extras so those settings work.

Locally, HF_HOME under /workspace means caches are written into your mounted project directory. Add .cache/ to .gitignore, or override with -e HF_HOME=/root/.cache/huggingface.

⁠Authentication

Do not put API keys or credentials in a Dockerfile.

Use the agents' interactive login flows — codex, claude, pi (Pi supports /login) — or pass keys at runtime:

docker run -d --name ai-devbox --gpus all \
  -e OPENAI_API_KEY \
  -e ANTHROPIC_API_KEY \
  -e CURSOR_API_KEY \
  -e XAI_API_KEY \
  -e HF_TOKEN \
  -e JUPYTER_PASSWORD='choose-a-secret' \
  -p 8888:8888 \
  -v "$PWD:/workspace" \
  melvindave/ai-devbox:1.2.0

The environment-variable form passes values already exported in the host shell; it does not copy them into the image.

⁠Coding agents

Inside /workspace, run any agent:

codex
claude
pi
cursor-agent
grok

Herdr keeps terminal sessions and agent work running between disconnects. All agents see the same mounted repository and can run Python, PyTorch, training, and inference commands with GPU access.

⁠Notes

  • Designed for linux/amd64. Requires an NVIDIA driver compatible with CUDA 12.8 and Docker GPU support.
  • Contains development tools, not project source code or model weights.
  • Keep model weights and repositories on mounted volumes.
  • nvtop is built from source because Ubuntu 24.04 ships 3.0.2, which aborts under WSL2 on assert(gpu_memory_percentage <= 100).

⁠Changes in 1.2.0

  • Rebased on runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
  • PyTorch 2.4.0 → 2.8.0+cu128, CUDA 12.4 → 12.8.1, Python 3.11 → 3.12
  • Added JupyterLab, hf CLI, nvtop, gpustat, ripgrep, fd-find, git-lfs
  • Default command is now /start.sh; pass bash explicitly for a shell
  • Moved from melvindave/runpod-pytorch to melvindave/ai-devbox
  • Tags now carry the environment: 1.2.0-cu1281-torch280-ubuntu2404-coding-agents

Tag summary

Content type

Image

Digest

sha256:3ed29cf51…

Size

10.7 GB

Last updated

4 days ago

docker pull melvindave/ai-devbox:1.3.0