# GPU container setup flagos

> GPU container setup flagos is an open-source agent skill for developer tools. Detects your GPU vendor and launches a validated PyTorch container with its devices. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/flagos-ai/skills/tree/main/skills/gpu-container-setup-flagos
- **Repository:** https://github.com/flagos-ai/skills
- **GitHub stars:** 22
- **License:** Apache-2.0
- **Skill name:** gpu-container-setup-flagos
- **Collection:** https://github.com/flagos-ai/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill sets up a PyTorch container on a machine with an accelerator card. It identifies the GPU vendor from the vendor's command-line tool or driver path, picks a suitable data disk, and looks for a matching PyTorch image, trying the vendor's own registry first, then a BAAI Harbor mirror, then a web search, then local images. Each candidate image is pulled and checked for a working torch import before it is used.

Once an image is chosen, the agent builds a docker run command with the device nodes and driver directories that each vendor needs, mounts the data disk at /data, and starts a long-running container named pytorch-gpu by default. It then copies a validation script into the container that checks device detection, tensor creation, matrix multiply and GPU-to-CPU transfer, and reports the result along with the access command. Supported backends are CUDA, ROCm, torch_npu, torch_musa and torch_corex.

The skill expects Docker, Python 3 and a host with vendor drivers installed, and it can run shell commands and query registry APIs over the network. Flags such as --vendor, --image, --data and --name let you override detection. The skill also includes a step that can add a newly discovered registry to its own reference notes after a successful test.

## When your agent uses it

> Automatically detect GPU vendor, find appropriate PyTorch container image, launch with correct mounts, and validate GPU functionality. Supports NVIDIA, Ascend, Metax, Iluvatar, and AMD/ROCm. Use when user says "setup container", "start pytorch container", or invokes /gpu-container-setup.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/flagos-ai/skills/tree/HEAD/skills/gpu-container-setup-flagos)
- [Asks for: Bash(*), Read, Edit, Write, Glob, Grep, WebSearch, WebFetch…](https://github.com/flagos-ai/skills/blob/HEAD/skills/gpu-container-setup-flagos/SKILL.md)
- [No network calls found in its scripts](https://github.com/flagos-ai/skills/tree/HEAD/skills/gpu-container-setup-flagos)
- [License: Apache-2.0](https://github.com/flagos-ai/skills/tree/HEAD/skills/gpu-container-setup-flagos)

## Features

- **Multi-vendor GPU detection:** Identifies NVIDIA, AMD, Ascend, Metax or Iluvatar hardware from vendor tools and driver paths.
- **Ordered image discovery:** Searches vendor hubs, a BAAI mirror, web results and local images in a fixed priority order.
- **Vendor-specific docker commands:** Builds run commands with the device nodes and driver mounts each accelerator type requires.
- **Automatic data disk selection:** Finds a suitable large disk on the host and mounts it into the container at /data.
- **PyTorch device validation:** Runs checks for device detection, tensor creation, matrix multiply and host transfer inside the container.
- **Existing container handling:** Asks whether to reuse or replace a container that already uses the chosen name.

## Good for

- Set up a PyTorch container on an NVIDIA server
- Start a PyTorch container on an Ascend NPU machine
- Launch a ROCm PyTorch container on an AMD GPU host
- Check that GPUs are visible and working inside a new container
- Start a container from a specific image tag I provide

## Install

### Claude Code

This skill ships in the `flagos-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add flagos-ai/skills
/plugin install flagos-skills@flagos-skills
```

Or copy only this skill to `~/.claude/skills/gpu-container-setup-flagos`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/gpu-container-setup-flagos &&
cp -R "$tmp/skills/gpu-container-setup-flagos" ~/.claude/skills/gpu-container-setup-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/gpu-container-setup-flagos` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/gpu-container-setup-flagos` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/gpu-container-setup-flagos &&
cp -R "$tmp/skills/gpu-container-setup-flagos" ~/.agents/skills/gpu-container-setup-flagos &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/gpu-container-setup-flagos` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/gpu-container-setup-flagos` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/gpu-container-setup-flagos &&
cp -R "$tmp/skills/gpu-container-setup-flagos" ~/.cursor/skills/gpu-container-setup-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/gpu-container-setup-flagos` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/flagos-ai/skills.git --path skills/gpu-container-setup-flagos
```

Or copy the folder to `~/.gemini/skills/gpu-container-setup-flagos` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/gpu-container-setup-flagos`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/gpu-container-setup-flagos &&
cp -R "$tmp/skills/gpu-container-setup-flagos" ~/.copilot/skills/gpu-container-setup-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/gpu-container-setup-flagos` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/flagos-ai/skills.git
```

Then copy `skills/skills/gpu-container-setup-flagos` into your agent's skills folder as `gpu-container-setup-flagos`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need on the host?

It uses Docker, runs a Python 3 detection script, and calls the vendor's command-line tools such as nvidia-smi or npu-smi, so the vendor drivers must already be installed.

### Which accelerator vendors are supported?

NVIDIA (CUDA), AMD (ROCm), Ascend (torch_npu), Metax (torch_musa) and Iluvatar (torch_corex).

### Where does the data disk appear inside the container?

The detected data disk is mounted at /data in the container.

### Can I skip automatic detection or pick the image myself?

Yes. The --vendor, --image, --data and --name flags force a vendor, image, data path or container name.

### How do I install GPU container setup flagos in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/gpu-container-setup-flagos to use it in all your projects, or to .claude/skills/gpu-container-setup-flagos in one project. Or install the flagos-skills plugin, which includes it: /plugin marketplace add flagos-ai/skills, then /plugin install flagos-skills@flagos-skills.

### Does GPU container setup flagos run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use GPU container setup flagos?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to GPU container setup flagos?

The closest alternatives to GPU container setup flagos are Install stack flagos, Tao run on docker, Kermt setup, Tao setup nvidia GPU host and Jetson package.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Install stack flagos](https://ai-powered.com/skills/install-stack-flagos): Install stack flagos is an open-source agent skill for developer tools.
- [Tao run on docker](https://ai-powered.com/skills/tao-run-on-docker): Tao run on docker is an open-source agent skill for developer tools.
- [Kermt setup](https://ai-powered.com/skills/kermt-setup): Kermt setup is an open-source agent skill for developer tools.
- [Tao setup nvidia GPU host](https://ai-powered.com/skills/tao-setup-nvidia-gpu-host): Tao setup nvidia GPU host is an open-source agent skill for developer tools.
- [Jetson package](https://ai-powered.com/skills/jetson-package): Jetson package is an open-source agent skill for developer tools.
- [Holoscan install container](https://ai-powered.com/skills/holoscan-install-container): Holoscan install container is an open-source agent skill for developer tools.
- [Tao run on kubernetes](https://ai-powered.com/skills/tao-run-on-kubernetes): Tao run on kubernetes is an open-source agent skill for developer tools.
- [Nsight port cpu to GPU](https://ai-powered.com/skills/nsight-port-cpu-to-gpu): Nsight port cpu to GPU is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/gpu-container-setup-flagos
