Installation
EngineSurogate EngineThis page gets Surogate onto your machine. Most people should use the install script (Option A); build from source only if you are working on Surogate itself.
Supported platforms
Section titled “Supported platforms”- Linux x86_64
- Linux aarch64 on a DGX Spark (GB10)
- NVIDIA GPU
GPU / CUDA
Section titled “GPU / CUDA”You need CUDA 13 and an NVIDIA driver from the 580 series or newer. There is no CUDA 12 build: the install script stops on a CUDA 12 host, and Compatibility explains why.
Multi-GPU training also needs NCCL (see Multi-GPU Training).
Python
Section titled “Python”The published wheels and the install script use Python 3.12 by default.
Option A: Install via script (recommended)
Section titled “Option A: Install via script (recommended)”curl -LsSf https://surogate.ai/install.sh | shThe script:
- installs
uvif it is missing - creates a local
.venvwith Python 3.12 - checks that your host has CUDA 13, then installs the Surogate wheel
- downloads example configs into
./examples/(unless they are already there)
Then activate the environment:
source .venv/bin/activateOption B: Build from source (developers)
Section titled “Option B: Build from source (developers)”You need:
- CUDA toolkit 13.x
- NCCL development libraries
- Rust 1.87 or newer and Cargo (not needed when installing a wheel)
From the repository root:
uv pip install -e .Be careful if you copy modules out of a CMake build tree: they are not self-contained. In the build
tree, _surogate keeps the build directory’s RUNPATH. The $ORIGIN RUNPATH applies only to
installed wheels, because BUILD_WITH_INSTALL_RPATH is off. A module copied elsewhere therefore
still loads libsurogate-common.so from the original build directory, ignoring the copy next to it,
and a rebuild there changes (or breaks) every copy. You can check which library loads with ldd or
/proc/<pid>/maps. For a package that must not move, use an installed wheel, or set the copy’s
RUNPATH to $ORIGIN (for example with patchelf --set-rpath).
DGX Spark (GB10)
Section titled “DGX Spark (GB10)”The install script detects the Arm host and installs the aarch64 wheel, which is built for GB10 (SM121) only. Training and serving use the same commands as on any other GPU.
To build from source on the Spark, install Rust with rustup plus the build prerequisites
above. The Makefile finds the CUDA toolkit in /usr/local/cuda, where DGX OS keeps it off
PATH. make build detects the GPU and builds for 121a, and make serve-build defaults to
121a on aarch64.
On the Spark, the GPU shares memory with the rest of the system. Surogate treats as free whatever
the system can still give it (MemAvailable, which includes reclaimable page cache), minus 8 GiB
kept for the host. Set SUROGATE_UNIFIED_MEMORY_RESERVE_MIB to change that reserve. The serving engine’s
automatic KV cache also leaves 2.5 GiB for the engine’s own host memory
(SUROGATE_UNIFIED_MEMORY_STARTUP_MIB), so a full cache does not eat into that reserve.
Verify installation
Section titled “Verify installation”Once installed, these commands should all print help text:
surogate --helpsurogate sft --helpsurogate pt --helpSee also
Section titled “See also”- Training Modes: pick the right workflow for your goal
- Quickstart: SFT: run your first fine-tune
- CLI reference: every
surogatecommand - Back to docs index