Python and PyTorch
Python and PyTorch on the GPU, with your project in your Mac folder. pip, uv and PyTorch work as usual.
The quick way: a project
$ cd ~/projects/vision
$ jacket init --python 3.12
⚡gpu ~/projects/vision $ uv venv --seed && source .venv/bin/activate
(.venv) ⚡gpu ~/projects/vision $ uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cu130
(.venv) ⚡gpu ~/projects/vision $ python -c "import torch; print(torch.cuda.get_device_name())"
See Projects on the GPU for what a project is and every jacket command.
Which CUDA version? PyTorch brings its own CUDA libraries, so you don't need a matching toolkit installed for it. CUDA 12 and CUDA 13 builds of PyTorch both work. Pick yours on pytorch.org (Linux, Pip, CUDA).
Train
(.venv) ⚡gpu ~/projects/vision $ python train.py
Checkpoints, logs and outputs land in your project folder, on your Mac, as they're written. Stop a run with Ctrl-C as usual.
Where things go
| What | Where |
|---|---|
| Your code, data and outputs | Your project folder, on your Mac |
The environment (.venv) | Your project folder |
| pip and uv download caches, Hugging Face models | Your Mac's ~/.cache, shared with your Mac tools |
| Python itself, and what you install with apt | The project's Linux on the GPU |
Without a project
Programs on the Jacket disk also run on the GPU directly. An environment made with the GPU machine's own
Python (3.13) works too, without jacket init:
$ /Volumes/Jacket/usr/bin/python3 -m venv .venv
$ source .venv/bin/activate
(.venv) $ pip install torch --index-url https://download.pytorch.org/whl/cu130
Good to know
uv venvmakes an environment without pip;uv venv --seedadds it.- Your Mac's own Python is untouched. Outside a project,
pythonis your Mac's as before. - Hugging Face models are downloaded once, to your Mac's cache, and used from there.