Projects on the GPU
Make a folder a project, and its tools run on the GPU by name, in a Linux of its own.
The idea
Run jacket init in a project folder. From then on, in that folder, the project's tools (uv,
python, pip, nvcc, nvidia-smi and anything you install for it) run on
the GPU, by their usual names. Step out of the folder and every command is your Mac's again. It works like nvm or
pyenv: the folder decides.
Each project gets a Linux of its own on the GPU (Ubuntu 24.04 by default). Install whatever the project needs,
with sudo apt install if you like: only that project sees it. Your files stay in your Mac folder.
Start a project
$ cd ~/projects/vision
$ jacket init --python 3.12
Project ready: vision runs on the GPU (ubuntu-24.04, Python 3.12).
⚡gpu ~/projects/vision $ uv venv --seed
⚡gpu ~/projects/vision $ source .venv/bin/activate
(.venv) ⚡gpu ~/projects/vision $ uv pip install torch --index-url https://download.pytorch.org/whl/cu130
(.venv) ⚡gpu ~/projects/vision $ python train.py
The ⚡gpu mark in your prompt tells you the project's tools are the GPU's. jacket init writes
a small .jacket file, and a .python-version if you chose a Python: commit them with your
project and it sets up the same way on another Mac.
The jacket command. Jacket offers to add it to your Terminal when you first set up the GPU. Turn it on or off any time in Settings → Command line tools; open a new Terminal window afterwards.
Jacket's Projects pane lists your projects, with each one's Python and the space its Linux takes, and removes a project's Linux when you no longer need it (your files stay).
Commands
| Command | What it does |
|---|---|
jacket init | Make this folder a project. Options: --python 3.12, --base ubuntu-24.04 or debian-13 |
jacket | A shell on the GPU, in the project's Linux |
jacket <command> | One command on the GPU: jacket nvidia-smi, jacket make |
jacket status | The GPU's load and memory, and this folder's project |
jacket rehash | Make tools you installed in the project usable by name |
jacket reset | Make the project's Linux anew (your files stay) |
jacket remove | Delete the project's Linux (your files and .jacket stay) |
Python versions
Each project has its own: jacket init --python 3.11, or a .python-version file, as pyenv and uv
use. Different projects can use different versions at the same time.
uv, pip and other tools
- uv:
uv sync,uv run,uv addwork as usual in a project. - pip and venv:
uv venv --seed(orpython -m venv .venvin ajacketshell) makes.venvin your project, with pip. - Poetry, PDM, Hatch, pipx tools: install them in the project (
uv tool install poetry); they work by name in the project right after. - Your Mac's own uv, Python and tools are untouched and work as before outside projects.
The project's .venv from your Mac
The project's .venv works from your Mac as it is: activate it in any Terminal, or point your editor at
.venv/bin/python. Whatever runs from it runs in the project's Linux on the GPU.
Bringing a project from your Mac
Already have a .venv made on your Mac? jacket init leaves it as it is: it keeps running on your
Mac, on Apple's GPU. Jacket makes the GPU's environment next to it, .venv-jacket, with the same Python
version and the same packages, built for Linux. PyTorch comes as its CUDA build.
$ jacket init
This folder has a Mac environment (.venv, Python 3.12, 9 packages).
Making the GPU's, .venv-jacket, with the same packages…
$ python train.py # on the NVIDIA card, from .venv-jacket
$ .venv/bin/python train.py # on your Mac, as before
- In the project,
python,pip,uv runanduv syncuse.venv-jacket. Point your editor at.venv-jacket/bin/pythonto run and debug on the GPU. - With a
pyproject.toml, Jacket makes it withuv syncfrom your project's own list. - Packages that exist only for macOS (such as PyObjC) are left out, and named.
- It takes space: one more copy of the project's packages (PyTorch with CUDA is about 5 GB). The project's page in Jacket shows how much. Don't need one of them anymore? Delete that folder.
.venv-jacketworks while the GPU is on; your Mac's.venvworks either way.
Other languages
A project is an ordinary Ubuntu, so anything that runs on Linux works in it. Install with sudo apt install,
rustup, juliaup, nvm and the like, in a jacket shell or as jacket sudo apt install …. What you install
works by name in the project from your Mac's Terminal right after, as uv does.
- CUDA C and C++:
nvcc, GCC, CMake and Make are there. Use a build folder of its own for the GPU (cmake -B build-gpu) if you also build on your Mac. - Rust: Linux builds go to
target/aarch64-unknown-linux-gnu/, so your Mac'starget/debugstays your Mac's. - Programs you build: type them as usual,
./apporbuild/train: in a project, a Linux program runs on the GPU. - Julia, Java, Go, Node.js and others: their packages live in the project's Linux, apart from your Mac's.
Node's
node_modulesis shared with your Mac: install it on the side that runs the project.
Good to know
- Projects live in your home folder. The GPU sees your home folder at the same paths as your Mac, so paths
work on both sides; other disks (
/Volumes/…) are not seen from the GPU yet. - The hook works in your Terminal's shell (zsh and bash). Editors, Makefiles and scripts use the project's
.venv/bin/pythonorjacket <command>. - Your downloads (pip, uv and Hugging Face caches) stay on your Mac in
~/.cache. - Servers you start in a project, such as Jupyter, open in your Mac's browser at
localhost. - Your environment variables go along (
PYTHONPATH,CUDA_VISIBLE_DEVICES, an editor's.env), except those that belong to your Mac's own system, such asPATHandHOME. - Several projects can run on the GPU at the same time, each in its own Linux.