> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Docker images for GB200

> Check Arm compatibility, build a multi-platform Docker image, and test your application on GB200.

GB200 systems pair Blackwell GPUs with Arm-based Grace CPUs. This guide shows how to check your Docker image, publish an Arm version alongside your existing x86 version, and test it on GB200.

## Prerequisites

* Docker with Buildx and a builder configured for `linux/amd64` and `linux/arm64`.
* A container registry account with permission to publish your image.
* Your application files and `Dockerfile`.
* A Vast.ai account for testing on a GB200 instance.

## 1 Check your existing image

On your development machine, inspect the exact image tag you use. Replace the example name below with your own registry namespace, image and tag.

```bash theme={null}
docker buildx imagetools inspect your-account/your-image:tag
```

Look for `linux/arm64` in the listed platforms. `linux/amd64` is the x86 version. If Arm is already listed, you can move to runtime testing, but still check that your framework and dependencies support Blackwell GPUs.

A multi-platform image stores both versions under one tag. Docker automatically selects the version that matches the machine.

## 2 Choose a base image with Arm and Blackwell support

Vast provides PyTorch images with AMD64 and ARM64 support. For this GB200 example, use a Blackwell-compatible PyTorch build with CUDA 12.8 or newer. CUDA 12.8 introduced native compiler support for Blackwell GPUs, including GB200's GPU architecture. Arm CPU support and Blackwell GPU support are separate requirements.

Do not choose a tag with `-cu126-` or `-cuda-12.6.3-` for this example just because it has an Arm version. Those names indicate an older PyTorch CUDA backend or CUDA base. Choose a Blackwell-compatible framework build and check the exact image tag. The base image's CUDA version alone does not establish compatibility for every installed package.

Some older CUDA applications can run on Blackwell through forward-compatible PTX. That is application-specific and should not be assumed for an arbitrary image. See the [CUDA 12.8 release notes](https://docs.nvidia.com/cuda/archive/12.8.0/cuda-toolkit-release-notes/index.html#new-features) and [NVIDIA Blackwell compatibility guide](https://docs.nvidia.com/cuda/blackwell-compatibility-guide/index.html).

Start from a compatible image and add your application dependencies. This minimal `Dockerfile` uses the base image shown in [Vast's PyTorch image documentation](https://github.com/vast-ai/base-image/blob/main/derivatives/pytorch/README.md), with `uv pip install` as specified in [Vast's contribution conventions](https://github.com/vast-ai/base-image/blob/main/CONTRIBUTING.md#conventions).

```dockerfile theme={null}
FROM vastai/pytorch:cuda-12.8.1-auto

RUN set -euo pipefail && \
    . /venv/main/bin/activate && \
    uv pip install --no-cache-dir transformers accelerate

# Keep this as the final RUN step
RUN set -euo pipefail && \
    env-hash > /.env_hash
```

Save this as `Dockerfile` in your build directory, then add the files and packages your application needs. Check the exact base tag's platforms before building.

Keep the `env-hash` step last, after every dependency change. Vast images can sync `/venv` to a volume and reuse a saved environment whose hash matches `/.env_hash`. If you install packages without refreshing the hash, an instance can reuse an older saved environment and your new packages will be missing at runtime.

For a reproducible release, pin your dependencies and replace the moving `auto` tag with a tested image digest.

## 3 Review your dependencies

A compatible base image is the starting point. Review your `Dockerfile` and setup scripts for software that assumes an x86 machine.

* **Downloaded executables.** Names containing `x86_64` or `amd64` often identify an x86 build. Select the corresponding Arm release for the Arm image.
* **Python packages with compiled components.** Confirm that your selected versions provide Linux Arm64 builds, or check what is required to compile them from source.
* **Files copied from your computer.** Copied binaries must match the target architecture. Rebuild native components for each target instead of copying an x86 build into both images.
* **Custom CUDA extensions.** Check compatibility with the Blackwell GPU architecture as well as the Arm CPU architecture.

Simple applications may need only packaging changes. An application with unsupported native dependencies can require additional development work.

## 4 Build and publish both versions

Use a Docker Buildx builder configured for both target platforms. Docker Desktop includes emulation support; other environments may need builder setup. See [Docker's multi-platform build guide](https://docs.docker.com/build/building/multi-platform/).

Sign in to your container registry, then run this command from the directory containing your `Dockerfile`. Replace the image name with a registry location you can publish to.

```bash theme={null}
docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t your-account/your-image:tag \
  --push .
```

This command builds and uploads both versions. Builds that compile dependencies under emulation can take substantially longer than native builds.

Inspect the published tag to confirm that both platforms are present.

```bash theme={null}
docker buildx imagetools inspect your-account/your-image:tag
```

Next, use the published image in your Vast template. Successful builds confirm packaging; the next step checks execution on the actual hardware.

## 5 Test on GB200

Launch a GB200 instance using your published image and an appropriate Vast template. For an image derived from Vast's PyTorch image, run the following inside the instance.

```bash theme={null}
. /venv/main/bin/activate

python - <<'PY'
import platform
import torch

print("CPU architecture:", platform.machine())
print("PyTorch:", torch.__version__)
assert torch.cuda.is_available(), "CUDA is unavailable"

print("GPU:", torch.cuda.get_device_name(0))
x = torch.randn(64, 64, device="cuda")
result = x @ x
torch.cuda.synchronize()
print("GPU operation passed:", tuple(result.shape))
PY
```

Expect an Arm architecture such as `aarch64`, the GPU name and a successful matrix operation. Then run a representative task in your application. A CUDA check alone does not validate every dependency or workload.

## Troubleshooting

| Error | What to check |
| - | - |
| `no matching manifest for linux/arm64/v8` | The exact image tag may lack an Arm version. Inspect the tag's platforms or publish an Arm build. |
| `exec format error` | An executable or script interpreter may target the wrong architecture. Check downloaded and copied binaries. |
| `No matching distribution found` | Check the package name and version, Python version, package index and Linux Arm64 availability. A source build may be required. |
| `no kernel image is available for execution on the device` | A framework or extension may lack GPU code compatible with Blackwell. Use a Blackwell-compatible framework build and rebuild incompatible CUDA extensions. |

## Additional resources

* [Vast PyTorch image documentation](https://github.com/vast-ai/base-image/blob/main/derivatives/pytorch/README.md)
* [Vast contribution conventions](https://github.com/vast-ai/base-image/blob/main/CONTRIBUTING.md)
* [Docker multi-platform builds](https://docs.docker.com/build/building/multi-platform/)
* [Docker image inspection reference](https://docs.docker.com/reference/cli/docker/buildx/imagetools/inspect/)
* [CUDA 12.8 release notes](https://docs.nvidia.com/cuda/archive/12.8.0/cuda-toolkit-release-notes/index.html)
* [NVIDIA Blackwell compatibility guide](https://docs.nvidia.com/cuda/blackwell-compatibility-guide/index.html)
* [NVIDIA framework support matrix](https://docs.nvidia.com/deeplearning/frameworks/support-matrix/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.