Skip to content
SurogateSurogateDocs
↑↓ to move↵ to openesc to close

Installation

This 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.

  • Linux x86_64
  • Linux aarch64 on a DGX Spark (GB10)
  • NVIDIA GPU

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).

The published wheels and the install script use Python 3.12 by default.

Section titled “Option A: Install via script (recommended)”
bash
curl -LsSf https://surogate.ai/install.sh | sh

The script:

  • installs uv if it is missing
  • creates a local .venv with 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:

bash
source .venv/bin/activate

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:

bash
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).

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.

Once installed, these commands should all print help text:

bash
surogate --help
surogate sft --help
surogate pt --help