> For the complete documentation index, see [llms.txt](https://docs.codemate.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemate.ai/toolbox/cuda-and-vllm-installation-guide.md).

# CUDA and vLLM Installation Guide

## 1. Purpose

This guide covers setting up Toolbox, the NVIDIA CUDA Toolkit, Python, and vLLM on a fresh client machine.

### Target environment

* **OS:** Ubuntu 24.04 LTS
* **Architecture:** ARM64 / AArch64 (SBSA)
* **Hardware:** Compatible NVIDIA GPU
* **CUDA Toolkit:** 13.0
* **Python:** 3.12
* **vLLM:** 0.30.0

> **Important:** These instructions target a compatible Ubuntu ARM64 NVIDIA system. ARM64 alone does not guarantee GPU or vLLM compatibility. Confirm the client's GPU model and driver support before installation. Run these commands on the fresh client machine, not on an already-configured production system.

***

## 2. Check the operating system and GPU

Run:

```bash
cat /etc/os-release
uname -m
dpkg --print-architecture
nvidia-smi
```

Expected architecture:

* `uname -m`: `aarch64`
* `dpkg --print-architecture`: `arm64`

If `nvidia-smi` is unavailable, check that the correct NVIDIA driver is installed and working before continuing.

***

## 3. Install Toolbox

Obtain the Toolbox Linux ARM64 `.deb` package from the supplied distribution link:

<https://codemate.ai/download>

Open a terminal in the directory containing the downloaded package.

Install it using:

```bash
sudo apt update
sudo apt install ./Toolbox-*.deb
```

If APT reports broken dependencies, review the proposed changes before running:

```bash
sudo apt --fix-broken install
```

Launch Toolbox using the application menu. If it does not appear, check the package installation and application launcher entries.

***

## 4. Install system prerequisites

```bash
sudo apt update
sudo apt install -y wget ca-certificates build-essential gcc g++ make curl git
```

***

## 5. Install NVIDIA CUDA Toolkit 13.0

Official NVIDIA documentation:

* CUDA 13.0 installation guide: <https://docs.nvidia.com/cuda/archive/13.0.3/cuda-installation-guide-linux/index.html>
* CUDA download selector: <https://developer.nvidia.com/cuda-downloads>
* Ubuntu 24.04 ARM64/SBSA repository: <https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/sbsa/>

Add NVIDIA's CUDA repository keyring:

```bash
cd /tmp
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/sbsa/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update
```

Install the CUDA Toolkit:

```bash
sudo apt install -y cuda-toolkit-13-0
```

> **Important:** Review the APT package changes before confirming. If the installer proposes removing or replacing an existing NVIDIA driver, stop and verify the correct installation procedure for the client's hardware.

Verify the installation:

```bash
nvcc --version
nvidia-smi
```

The CUDA compiler should report release 13.0. The CUDA version reported by `nvidia-smi` describes the driver's supported CUDA level; it does not by itself confirm which Toolkit is installed.

### Configure the CUDA environment if required

Check whether the Toolkit directory exists:

```bash
ls -ld /usr/local/cuda*
```

If `/usr/local/cuda-13.0` exists, configure the environment:

```bash
sudo ln -sfn /usr/local/cuda-13.0 /usr/local/cuda

sudo tee /etc/profile.d/cuda.sh >/dev/null <<'EOF'
export CUDA_HOME=/usr/local/cuda
export PATH="$CUDA_HOME/bin:$PATH"
export LD_LIBRARY_PATH="$CUDA_HOME/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
EOF

source /etc/profile.d/cuda.sh
nvcc --version
```

***

## 6. Install uv and create a Python environment

Official uv installation documentation:

<https://docs.astral.sh/uv/getting-started/installation/>

Install uv:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.local/bin/env"
uv --version
```

Create a dedicated environment:

```bash
mkdir -p ~/vllm-setup
cd ~/vllm-setup

uv venv --python 3.12
source .venv/bin/activate

python --version
```

Use a separate environment for vLLM to avoid conflicts with other Python applications.

***

## 7. Install vLLM 0.30.0

Official documentation:

* GPU installation: <https://docs.vllm.ai/en/latest/getting_started/installation/gpu/>
* vLLM 0.30.0 release: <https://github.com/vllm-project/vllm/releases/tag/v0.30.0>

With the virtual environment activated, install the CUDA 13.0 build:

```bash
uv pip install "vllm==0.30.0" --torch-backend=cu130
```

This installation may download large packages and requires a reliable internet connection and sufficient disk space.

If installation fails, check the exact GPU model, ARM64 support, Python compatibility, NVIDIA driver, and wheel availability for the pinned release. Follow the official vLLM release instructions rather than installing an arbitrary wheel.

***

## 8. Verify the installation

Run:

```bash
nvidia-smi
nvcc --version
vllm --version
```

Verify PyTorch and GPU access:

```bash
python -c "import torch; print('PyTorch:', torch.__version__); print('PyTorch CUDA:', torch.version.cuda); print('CUDA available:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'GPU unavailable')"
```

Before starting a model, confirm that `CUDA available` is `True` and the expected GPU is displayed.

***

## 9. Start the vLLM model server

The following is the reference serving command. It assumes that the selected model and its required configuration are compatible with the installed vLLM release and the client's available GPU memory.

For example, you want to use the qwen3.8 model in here. The following will be the command.

> **Note:** You can always change the model depending upon your requirements and available compute.

```bash
vllm serve nvidia/Qwen3.8-27B-NVFP4 \
  --kv-cache-dtype fp8 \
  --gpu-memory-utilization 0.7 \
  --max-model-len 262144 \
  --max-num-seqs 8 \
  --max-num-batched-tokens 8192 \
  --enable-chunked-prefill \
  --async-scheduling \
  --enable-prefix-caching \
  --load-format fastsafetensors \
  --tensor-parallel-size 1 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_xml \
  --reasoning-parser qwen3 \
  --mm-encoder-tp-mode data \
  --port 12110 \
  --served-model-name qwen3.8
```

The first launch may download model files. Ensure that the machine has enough disk space, GPU memory, network access, and any required model repository permissions.

If the model fails to load, check the model's current vLLM compatibility and available GPU memory. Do not assume that a model or all command-line flags work on every GPU or vLLM version.

***

## 10. Test the server

Once the server has started, open a second terminal and run:

```bash
curl -f http://127.0.0.1:12110/health
curl http://127.0.0.1:12110/v1/models
```

The health endpoint should respond successfully, and the models endpoint should return the model served by vLLM.

For a request from another machine, configure network access and firewall rules deliberately. Do not expose the inference endpoint publicly without appropriate authentication and access controls.

***

## 11. Troubleshooting

### `nvidia-smi` fails

* Verify that the NVIDIA driver is installed and compatible with the GPU.
* Check the manufacturer's installation instructions for the specific platform.
* Reboot only if required by the driver installation process.

### `nvcc` is not found

* Confirm that `cuda-toolkit-13-0` installed successfully.
* Check `/usr/local/cuda-13.0/bin/nvcc`.
* Review the CUDA environment configuration in Section 5.

### PyTorch cannot access the GPU

* Confirm `nvidia-smi` works.
* Confirm that the Python environment is activated.
* Verify that the installed PyTorch wheel supports the target GPU and CUDA backend.

### vLLM installation fails

* Check the official release instructions and available ARM64 wheels.
* Confirm Python, CUDA backend, driver, and architecture compatibility.
* Capture the full installation error before changing package versions.

### The model does not start

* Check GPU memory and free disk space.
* Confirm access to the model repository.
* Verify model support and the serving flags against the installed vLLM release.
* Reduce context length or concurrency only if appropriate for the intended workload.

***

## 12. Official references

* NVIDIA CUDA 13.0 installation guide: <https://docs.nvidia.com/cuda/archive/13.0.3/cuda-installation-guide-linux/index.html>
* NVIDIA CUDA downloads: <https://developer.nvidia.com/cuda-downloads>
* vLLM GPU installation guide: <https://docs.vllm.ai/en/latest/getting_started/installation/gpu/>
* vLLM 0.30.0 release: <https://github.com/vllm-project/vllm/releases/tag/v0.30.0>
* uv installation documentation: <https://docs.astral.sh/uv/getting-started/installation/>
