tao-run-on-local-docker
NVIDIA/skills
NVIDIA GPU를 지원하는 로컬 또는 원격 Docker 데몬에서 TAO SDK 작업을 Docker 컨테이너로 실행하며, 여기에는 사전 검증 및 자격 증명 처리가 포함됩니다.
...모든 것을 확장하십시오로컬 Docker
Docker 데몬에서 TAO 작업을 명명된 Docker 컨테이너로 실행하는
단일 노드 실행 플랫폼입니다. 이 데몬은 에이전트 호스트에 로컬로 존재하거나
DOCKER_HOST=ssh://user@host / 도커 컨텍스트를 통해 원격으로 위치할 수 있습니다. 이는 개발,
디버깅, 소규모 실행 및 로컬 코딩 에이전트가 원격 GPU 서버에
작업을 제출하는 워크플로우에 유용합니다.
데이터가 Docker 호스트에 로컬로 존재하거나 마운트된 볼륨/클라우드 자격 증명을 통해 접근할 수 있는 경우 로컬 Docker를 사용하십시오. 원격 클러스터 스케줄링, 다중 노드 훈련 또는 SLURM 큐잉이 필요한 작업에는 사용하지 마십시오.
에이전트가 워크스테이션이나 노트북에서 실행되지만 Docker 데몬과 GPU가 다른 단일 GPU 서버에 있는 경우에는 원격 Docker를 사용하십시오. 원격 Docker 모드에서는 specs 내의 모든 로컬 파일 시스템 경로가 에이전트 머신이 아닌 원격 Docker 호스트에서 해석됩니다.
사전 검증
워크플로는 Docker 작업을 시작하기 전에 호스트 GPU 런타임을 반드시 확인해야 합니다. 검사가 실패하면 사용자에게 설치 승인을 요청하고, 표시된 설치 명령어를 실행한 후 사전 검사를 다시 실행하십시오.
# Host GPU runtime: NVIDIA driver 580, CUDA 13.0, NVIDIA Container Toolkit 1.19.0.
TAO_SKILL_BANK_ROOT="${TAO_SKILL_BANK_ROOT:-$PWD}"
SETUP_SCRIPT="${TAO_SKILL_BANK_ROOT}/skills/platform/tao-setup-nvidia-gpu-host/scripts/setup-nvidia-gpu-host.sh"
bash "$SETUP_SCRIPT" --backend docker --check-only || {
echo "MISSING: TAO GPU host runtime is not ready."
echo "After user approval, run:"
echo " bash \"$SETUP_SCRIPT\" --backend docker --install --yes"
exit 1
}
# Mode 1 — direct docker (no Python). All you need is docker + the GPU runtime.
docker info >/dev/null 2>&1 || { echo "MISSING: docker daemon not reachable. Start Docker."; exit 1; }
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi >/dev/null 2>&1 || {
echo "MISSING: NVIDIA Container Toolkit not installed/configured. See:"
echo " bash \"$SETUP_SCRIPT\" --backend docker --install --yes"
exit 1
}
# Mode 2 — TAO SDK wrapper. Adds Job handles, S3 I/O wrapping, ActionWorkflow.
# Skip this block if Mode 1 is sufficient for the user's request.
# When Mode 2 is in scope, read `tao-skill-bank:tao-run-platform` for the DockerSDK
# kwarg contract, build_entrypoint, and monitoring patterns.
# nvidia-tao-sdk is on public PyPI; pin lives in versions.yaml (wheels.tao_sdk_docker).
PIN=$("${TAO_SKILL_BANK_PATH:?}/scripts/resolve_versions_key.py" wheels.tao_sdk_docker)
python -c "import tao_sdk" 2>/dev/null || python -m pip install "$PIN"
python -c "import docker" 2>/dev/null || python -m pip install "$PIN"
python -c "import tao_sdk, docker"
# DockerSDK attaches every job container to ${DOCKER_NETWORK:-tao_default}.
# Create the network if it is missing; the operation is local and idempotent.
DOCKER_NETWORK_NAME="${DOCKER_NETWORK:-tao_default}"
docker network inspect "$DOCKER_NETWORK_NAME" >/dev/null 2>&1 || \
docker network create "$DOCKER_NETWORK_NAME" >/dev/null
검사가 실패하면, 에이전트는 진행하기 전에 사용자에게 Bash를 통해 설치/수정 작업을 승인하도록 요청합니다. Pip로 설치 가능한 Python 요구 사항과 앞서 언급한 Docker 네트워크 생성은 예외입니다. 이 경우 자동으로 설치/생성한 후 사전 검증을 다시 실행합니다.
인증 정보
Docker 데몬에 대한 액세스 권한 외에 필요한 플랫폼 자격 증명은 없습니다.
선택적 환경 변수:
- DOCKER_HOST: 선택적 Docker 데몬 URL입니다. 설정되지 않은 경우, SDK는
Docker Python 클라이언트의 일반적인 환경/기본 소켓 해결 방식을 사용합니다. 이 옵션은
remote-docker필수입니다. - DOCKER_NETWORK: 작업 컨테이너용 Docker 네트워크. 기본값은
tao_default. - DOCKER_USERNAME: 레지스트리 사용자 이름입니다. 기본값은
$oauthtokenNGC용입니다. - NGC_KEY: 비공개 이미지를 가져올 때 사용됩니다.
nvcr.io. - HOST_SSH_PATH: 원격 SLURM 자식 작업을 모니터링하기 위해 SSH 키가 필요한 경우 AutoML 브레인 컨테이너에 마운트됩니다.
- ACCESS_KEY, SECRET_KEY, S3_ENDPOINT_URL, S3_BUCKET_NAME: 로컬 컨테이너에서 클라우드 스토리지를 읽고 쓰는 작업을 위한 선택적 S3 호환 스토리지 설정입니다.
실행 전 사전 점검
스크립트를 생성하거나 컨테이너를 시작하기 전에:
- Docker 데몬에 연결 가능한지, NVIDIA Container Toolkit이
Docker 런타임으로 등록되어 있는지, GPU 및 드라이버 버전이 보고되는지, 그리고 실행 전
테스트용 컨테이너가 GPU를 인식할 수 있는지 확인하십시오. 원격 Docker의 경우,
docker run ... nvidia-smi; 에이전트 머신의 로컬nvidia-smi에이전트 머신에서 로컬을 사용하지 마십시오. - 모든 로컬/파일 데이터셋 어노테이션과 미디어 경로가 Docker 호스트에 존재하는지 확인하십시오.
- 다음의 경우
s3://데이터셋/결과에 대해서는ACCESS_KEY가 설정되어 있는지SECRET_KEY가 설정되어 있는지 확인하고, 정확한 경로가aws s3 ls. 만약aws가 누락된 경우, 누락된 종속성을 보고하고 설치 전에 사용자에게 확인을 요청하십시오. 설치 후 사전 점검을 다시 실행하십시오. - 런치 전에
HF_TOKEN와 같은 모델별 자격 증명을 확인하십시오. - 다음 명령어를 사용하여 현재 GPU 사용 현황을 확인하고
nvidia-smi를 사용하여 현재 GPU 사용률을 확인하고, 사용자가 해당 제약 조건을 요청한 경우 다른 실행 중인 작업에서 이미 사용 중인 GPU는 피하십시오. 실행 검토 화면에 선택된 GPU ID를 표시하십시오. - 아키텍처 제한이 알려진 모델/컨테이너 조합의 경우, 실행 전에 호스트 GPU 연산 성능과 컨테이너 스택을 비교하십시오. 만약 선택한 이미지가 호스트 아키텍처에 대해 JIT를 수행하거나 커널을 실행할 수 없는 경우, 조기에 차단하고 호환되는 이미지나 플랫폼을 요청하십시오.
가능한 경우 이러한 확인 작업에 패키지된 헬퍼를 사용하십시오:
${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/check_tao_launch_preflight.py \
--platform local-docker \
--container-image "" \
--path train_annotation=/abs/path/to/annotations.json \
--path train_media=/abs/path/to/media
원격 Docker 데몬의 경우, remote-docker platform을 사용하고 pass 또는 export
DOCKER_HOST를 전달하거나 내보내십시오. 이 헬퍼는 원격 GPU/런타임 준비 상태를 확인하고
읽기 전용 바인드 마운트를 통해 원격 호스트의 데이터셋 경로를 확인합니다:
${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/check_tao_launch_preflight.py \
--platform remote-docker \
--docker-host ssh://user@gpu-host \
--container-image "" \
--gpu-smoke-image ubuntu:22.04 \
--path train_annotation=/remote/data/train/annotations.json \
--path train_media=/remote/data/train
위의 --path 위의 값들은 원격 Docker 호스트에 반드시 존재해야 합니다. 로컬 노트북이나 Codex 호스트에만 존재하는
경로는 전달하지 마십시오.
다중 GPU 및 다중 노드
로컬 Docker에서는 다중 노드가 지원되지 않습니다. 하나의 작업이 로컬 Docker 데몬의 호스트에서 실행되며, 호스트 간 조정은 이루어지지 않습니다.
로컬 호스트에서의 멀티-GPU는 NVIDIA Container Toolkit의 --gpus 플래그(--gpus all 또는 --gpus '"device=0,1,2,3"'). DockerSDK.create_job(gpu_count=N) 다음으로 연결됩니다 --gpus를 통해 전달됩니다). 단일 호스트 분산 초기화에서는 localhost; torchrun --nproc-per-node=N 또는 PyTorch DDP는 평소와 같이 작동합니다.
백엔드 세부 정보
SDK 백엔드 값을 사용하십시오 local-docker를 사용하십시오. 로컬 백엔드 스키마에는 추가적인
백엔드 세부 정보가 없으므로, 대부분의 라우팅은 환경 및 작업
매개변수에 의해 제어됩니다:
{
"backend_type": "local-docker",
"num_gpu": 1
}
Brev SDK 설계에 따라, 플랫폼/제어 플레인 값은 SDK
상태와 Docker 레이블에 유지됩니다. SDK는 BACKEND, HOST_PLATFORM,
MONGOSECRET, DOCKER_HOST, 또는 DOCKER_NETWORK 를 주입하지 않습니다.
컨테이너 실행
TAO SDK의 로컬 Docker 핸들러는 Docker Python 클라이언트를 통해 컨테이너를 시작합니다:
- 백엔드 작업 이름은
tao-job-양식을 따릅니다. - 명령어는 일반적으로
["/bin/bash", "-c", "."] - 컨테이너는 분리된 상태로 실행됩니다. SDK는 기본적으로 컨테이너를 유지하므로,
DOCKER_AUTO_REMOVE=true. /dev/shmtmpfs로 마운트된 경우는 예외입니다.- 구성된 Docker 네트워크는 Docker 데몬에 의해 작업 컨테이너에 적용되며, 프로세스 환경 변수로 전달되지는 않습니다.
- 동일한 작업 ID를 가진 기존 컨테이너는 대체 컨테이너가 시작되기 전에 중지되고 제거됩니다.
GPU 액세스의 경우, 핸들러가 호스트 유형을 자동으로 감지합니다:
- Tegra 또는 Jetson 호스트는
runtime="nvidia"plusNVIDIA_VISIBLE_DEVICES를 사용하며,NVIDIA_DRIVER_CAPABILITIES=all. - 표준 x86 호스트는 GPU 기능을 갖춘 Docker
device_requests를 사용합니다.
만약 num_gpus 인 경우 0인 경우, GPU가 할당되지 않습니다. 만약 num_gpus 가인 경우, 보이는 모든 -1인 경우, 보이는 모든
GPU가 요청됩니다. 공유 개발 머신의 경우 명시적인 GPU 개수를 우선적으로 사용하십시오.
명시적인 장치 ID를 사용할 수 있는 경우, 공유 머신에서 개수만 지정하는 선택 방식보다 이를 우선적으로 사용하여
실행 과정에서 다른 작업이 점유 중인 GPU를 빼앗지 않도록 하십시오.
저장소
로컬 Docker는 로컬 및 file:// 경로를 모두 허용합니다. 이는 컨테이너가
동일한 Docker 호스트에서 실행되기 때문입니다. 사양(spec) 내의 모든 경로가 다음 중 하나에 해당하도록 확인하십시오:
- 핸들러나 주변 서비스에 의해 컨테이너에 마운트되어 있거나,
- 컨테이너 내부에서 이미 접근 가능하거나,
- 일치하는 자격 증명이 포함된 클라우드 URI여야 합니다.
원격/공유 파일 시스템의 경우, 해당 파일 시스템을 소유한 플랫폼을 우선적으로 사용하십시오.
예를 들어, 클러스터의 Lustre 경로에는 SLURM과 lustre:///... 클러스터의 Lustre 경로에는 SLURM을 함께 사용하십시오.
모니터링
- SDK 핸들러는 Docker 컨테이너 상태를 다음과 같이 직접 매핑합니다: 생성됨 -> 대기 중, 실행 중/재시작 중 -> 실행 중, 일시 중지됨 -> 일시 중지됨, 종료 코드 0 -> 완료, 0이 아닌 종료 코드 -> 오류.
- 로그는 Docker Python 클라이언트를 통해 지정된 컨테이너에서 직접 전송됩니다
(
docker logs tao-job-).
컨테이너가 종료되었거나, 비정상 종료되었거나, 제거 중이거나, 찾을 수 없는 경우, 상태 조정 기능은 백엔드 프로세스를 종료된 것으로 간주합니다.
취소
취소 시 지정된 컨테이너가 중지됩니다. GPU 소유권은 TAO Core의 로컬 GPU 관리자가 아닌 Docker / NVIDIA 런타임에 의해 관리됩니다.
선택 사항: TAO SDK를 통한 방법
작업 핸들, SDK를 통한 S3 I/O 래핑 script_runner, 또는
세션 간 내구성을 원한다면:
from tao_sdk.platforms.docker import DockerSDK
sdk = DockerSDK() # reads DOCKER_HOST, NGC_KEY, S3 creds from env
job = sdk.create_job(
image='nvcr.io/nvidia/tao/tao-toolkit:6.26.3-pyt',
command='dino train -e /tmp/spec.yaml',
gpu_count=1,
inputs={'/data/train.json': 's3://bucket/coco/train.json'},
outputs=['/results/'],
)
status = sdk.get_job_status(job.id)
logs = sdk.get_job_logs(job.id, tail=200)
이는 동일한 docker run 호출을 Job 핸들로 감싸고
엔트리포인트를 script_runner 파일이/에서 자동으로 다운로드되거나 inputs/outputs S3에서
자동으로 다운로드되거나 업로드됩니다. 이러한 기능이 필요하지 않다면,
docker run 직접 사용하면 됩니다. SDK를 설치할 필요가 없습니다.
오류 유형
Docker 클라이언트가 초기화되지 않음: Docker Python 패키지가 설치되어 있는지 확인하고,
기본 로컬 소켓을 사용하지 않는 경우 DOCKER_HOST 기본 로컬 소켓을 사용하지 않는 경우 설정을 확인하고,
프로세스가 데몬과 통신할 수 있는지 확인하십시오.
GPU 할당 실패: 요청한 GPU를 사용할 수 없거나, NVIDIA Container
Toolkit이 구성되지 않았거나, Docker 데몬이 GPU 장치
요청을 생성할 수 없는 경우입니다. GPU 수를 줄이거나, 다른 작업이 완료될 때까지 기다리거나,
docker run --gpus ... 호스트에서 작동하는지 확인하십시오.
이미지 가져오기 인증 실패: 유효한 NGC_KEY 를 설정하거나이미지가 nvcr.io 이미지에 대해 유효한
인증 정보를 설정하거나 docker login nvcr.io -u '$oauthtoken' 실행하십시오.
컨테이너가 예기치 않게 종료되었습니다: docker logs tao-job-,
구성된 DOCKER_NETWORK, 그리고 SDK 액션 러너에서 생성된 명령어를 확인하십시오.
컨테이너 내부에서 경로가 누락되었습니다: 호스트의 로컬 경로가 반드시 작업 컨테이너에 마운트되는 것은 아닙니다. 액션 실행기가 지원하는 경로 규칙을 사용하거나, 상위 서비스를 통해 명시적인 볼륨을 구성하십시오.
---
name: tao-run-on-local-docker
description: Run TAO SDK jobs as Docker containers on a local or remote Docker daemon with NVIDIA GPU support, including preflight checks and credential handling.
license: Apache-2.0
---
# Local Docker
Single-node execution platform that runs TAO jobs as named Docker containers on
a Docker daemon. The daemon can be local to the agent host or remote through
`DOCKER_HOST=ssh://user@host` / a Docker context. It is useful for development,
debugging, small runs, and workflows where a local coding agent submits jobs to
a remote GPU box.
Use local Docker when the data is local to the Docker host or accessible through
mounted volumes/cloud credentials. Do not use it for remote cluster scheduling,
multi-node training, or jobs that need SLURM queueing.
Use remote Docker when the agent is running on a workstation or laptop but the
Docker daemon and GPUs are on another single GPU server. In remote Docker mode,
all local filesystem paths in specs are interpreted on the remote Docker host,
not on the agent machine.
## Preflight
The workflow must verify the host GPU runtime before starting Docker jobs. If
the check fails, prompt the user to approve the install, run the printed install
command, and rerun the preflight.
```bash
# Host GPU runtime: NVIDIA driver 580, CUDA 13.0, NVIDIA Container Toolkit 1.19.0.
TAO_SKILL_BANK_ROOT="${TAO_SKILL_BANK_ROOT:-$PWD}"
SETUP_SCRIPT="${TAO_SKILL_BANK_ROOT}/skills/platform/tao-setup-nvidia-gpu-host/scripts/setup-nvidia-gpu-host.sh"
bash "$SETUP_SCRIPT" --backend docker --check-only || {
echo "MISSING: TAO GPU host runtime is not ready."
echo "After user approval, run:"
echo " bash \"$SETUP_SCRIPT\" --backend docker --install --yes"
exit 1
}
# Mode 1 — direct docker (no Python). All you need is docker + the GPU runtime.
docker info >/dev/null 2>&1 || { echo "MISSING: docker daemon not reachable. Start Docker."; exit 1; }
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi >/dev/null 2>&1 || {
echo "MISSING: NVIDIA Container Toolkit not installed/configured. See:"
echo " bash \"$SETUP_SCRIPT\" --backend docker --install --yes"
exit 1
}
# Mode 2 — TAO SDK wrapper. Adds Job handles, S3 I/O wrapping, ActionWorkflow.
# Skip this block if Mode 1 is sufficient for the user's request.
# When Mode 2 is in scope, read `tao-skill-bank:tao-run-platform` for the DockerSDK
# kwarg contract, build_entrypoint, and monitoring patterns.
# nvidia-tao-sdk is on public PyPI; pin lives in versions.yaml (wheels.tao_sdk_docker).
PIN=$("${TAO_SKILL_BANK_PATH:?}/scripts/resolve_versions_key.py" wheels.tao_sdk_docker)
python -c "import tao_sdk" 2>/dev/null || python -m pip install "$PIN"
python -c "import docker" 2>/dev/null || python -m pip install "$PIN"
python -c "import tao_sdk, docker"
# DockerSDK attaches every job container to ${DOCKER_NETWORK:-tao_default}.
# Create the network if it is missing; the operation is local and idempotent.
DOCKER_NETWORK_NAME="${DOCKER_NETWORK:-tao_default}"
docker network inspect "$DOCKER_NETWORK_NAME" >/dev/null 2>&1 || \
docker network create "$DOCKER_NETWORK_NAME" >/dev/null
```
If a check fails, the agent prompts the user to authorize the install/fix via Bash before proceeding. Pip-installable Python requirements and Docker network creation above are exceptions: install/create them automatically, then rerun preflight.
## Credentials
There are no platform credentials required beyond access to the Docker daemon.
Optional environment:
- **DOCKER_HOST**: Optional Docker daemon URL. If unset, the SDK uses the
Docker Python client's normal environment/default socket resolution. Required
for the `remote-docker` platform option.
- **DOCKER_NETWORK**: Docker network for job containers. Default is
`tao_default`.
- **DOCKER_USERNAME**: Registry username. Default is `$oauthtoken` for NGC.
- **NGC_KEY**: Used when pulling private images from `nvcr.io`.
- **HOST_SSH_PATH**: Mounted into AutoML brain containers when they need SSH keys
to monitor remote SLURM child jobs.
- **ACCESS_KEY**, **SECRET_KEY**, **S3_ENDPOINT_URL**, **S3_BUCKET_NAME**:
Optional S3-compatible storage settings for jobs that still read/write cloud
storage from a local container.
## Launch Preflight
Before generating scripts or starting containers:
1. Verify the Docker daemon is reachable, NVIDIA Container Toolkit is registered
as a Docker runtime, GPUs and driver version are reported, and a smoke
container can see GPUs before launch. For remote Docker, query GPUs through
`docker run ... nvidia-smi` against the remote daemon; do not use local
`nvidia-smi` from the agent machine.
2. Verify every local/file dataset annotation and media path exists on the
Docker host.
3. For `s3://` datasets/results, verify `ACCESS_KEY` and `SECRET_KEY` are set
and the exact paths are readable with `aws s3 ls`. If `aws` is missing,
report the missing dependency and ask before installing it; rerun preflight
after installation.
4. Verify model-specific credentials such as `HF_TOKEN` before launch.
5. Check current GPU occupancy with `nvidia-smi` and avoid GPUs already used by
other running jobs when the user requested that constraint. Show the selected
GPU ids in the launch review.
6. For model/container combinations with known architecture limits, compare
host GPU compute capability with the container stack before launch. If the
selected image cannot JIT or run kernels for the host architecture, block
early and ask for a compatible image or platform.
Use the packaged helper for these checks when possible:
```bash
${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/check_tao_launch_preflight.py \
--platform local-docker \
--container-image "<selected-image>" \
--path train_annotation=/abs/path/to/annotations.json \
--path train_media=/abs/path/to/media
```
For a remote Docker daemon, use the `remote-docker` platform and pass or export
`DOCKER_HOST`. The helper verifies remote GPU/runtime readiness and checks
remote-host dataset paths through read-only bind mounts:
```bash
${TAO_SKILL_BANK_PATH:-~/tao-skills-external}/scripts/check_tao_launch_preflight.py \
--platform remote-docker \
--docker-host ssh://user@gpu-host \
--container-image "<selected-image>" \
--gpu-smoke-image ubuntu:22.04 \
--path train_annotation=/remote/data/train/annotations.json \
--path train_media=/remote/data/train
```
The `--path` values above must exist on the remote Docker host. Do not pass
paths that exist only on the local laptop or Codex host.
## Multi-GPU and multi-node
**Multi-node is not supported on local Docker.** One job runs on the local Docker daemon's host with no cross-host coordination.
Multi-GPU **on the local host** is supported via the NVIDIA Container Toolkit's `--gpus` flag (`--gpus all` or `--gpus '"device=0,1,2,3"'`). `DockerSDK.create_job(gpu_count=N)` plumbs through to `--gpus`. Single-host distributed init uses `localhost`; `torchrun --nproc-per-node=N` or PyTorch DDP work as usual.
## Backend Details
Use the SDK backend value `local-docker`. The local backend schema has no extra
backend details, so most routing is controlled by environment and job
parameters:
```json
{
"backend_type": "local-docker",
"num_gpu": 1
}
```
Following the Brev SDK design, platform/control-plane values stay in SDK
state and Docker labels. The SDK does not inject `BACKEND`, `HOST_PLATFORM`,
`MONGOSECRET`, `DOCKER_HOST`, or `DOCKER_NETWORK` into the training container.
## Container Execution
The TAO SDK local Docker handler starts containers through the Docker Python
client:
- Backend job name uses the `tao-job-<job_id>` form used by SDK handlers.
- Command is usually `["/bin/bash", "-c", "<job command>"]`.
- Containers run detached. The SDK keeps containers by default so status and
logs remain inspectable, unless `DOCKER_AUTO_REMOVE=true`.
- `/dev/shm` is mounted as tmpfs.
- The configured Docker network is applied by the Docker daemon for the job
container; it is not passed through as a process environment variable.
- Existing containers with the same job id are stopped and removed before a
replacement starts.
For GPU access, the handler auto-detects the host type:
- Tegra or Jetson hosts use `runtime="nvidia"` plus
`NVIDIA_VISIBLE_DEVICES` and `NVIDIA_DRIVER_CAPABILITIES=all`.
- Standard x86 hosts use Docker `device_requests` with GPU capabilities.
If `num_gpus` is `0`, no GPUs are assigned. If `num_gpus` is `-1`, all visible
GPUs are requested. Prefer explicit GPU counts for shared development machines.
When explicit device ids are available, prefer them over count-only selection
on shared machines so the launch does not steal GPUs occupied by other tasks.
## Storage
Local Docker accepts local and `file://` paths because the container runs on the
same Docker host. Make sure every path in the spec is either:
- mounted into the container by the handler or surrounding service,
- reachable from inside the container already, or
- a cloud URI with matching credentials.
For remote/shared filesystems, prefer the platform that owns that filesystem.
For example, use SLURM plus `lustre:///...` for Lustre paths on a cluster.
## Monitoring
- The SDK handler maps Docker container state directly: created -> Pending,
running/restarting -> Running, paused -> Paused, exit code 0 -> Complete,
nonzero exit -> Error.
- Logs come directly from the named container through the Docker Python client
(`docker logs tao-job-<job_id>`).
If the container has exited, died, is being removed, or cannot be found, status
reconciliation treats the backend process as terminated.
## Cancellation
Cancellation stops the named container. GPU ownership is managed by Docker /
the NVIDIA runtime, not by TAO Core's local GPU manager.
## Optional: via the TAO SDK
If you want Job handles, S3 I/O wrapping via the SDK's `script_runner`, or
durability across sessions:
```python
from tao_sdk.platforms.docker import DockerSDK
sdk = DockerSDK() # reads DOCKER_HOST, NGC_KEY, S3 creds from env
job = sdk.create_job(
image='nvcr.io/nvidia/tao/tao-toolkit:6.26.3-pyt',
command='dino train -e /tmp/spec.yaml',
gpu_count=1,
inputs={'/data/train.json': 's3://bucket/coco/train.json'},
outputs=['/results/'],
)
status = sdk.get_job_status(job.id)
logs = sdk.get_job_logs(job.id, tail=200)
```
This wraps the same `docker run` invocation under a `Job` handle and routes
the entrypoint through `script_runner` so `inputs`/`outputs` get downloaded
from / uploaded to S3 automatically. If you don't need those, just use
`docker run` directly — no SDK install required.
## Failure Modes
**Docker client not initialized**: Verify the Docker Python package is installed,
set `DOCKER_HOST` if you are not using the default local socket, and confirm the
process can talk to the daemon.
**GPU assignment failed**: Requested GPUs are unavailable, the NVIDIA Container
Toolkit is not configured, or the Docker daemon cannot create GPU device
requests. Use fewer GPUs, wait for another job to finish, or verify
`docker run --gpus ...` works on the host.
**Image pull auth failed**: Set a valid `NGC_KEY` for private `nvcr.io` images
or run `docker login nvcr.io -u '$oauthtoken'` on the Docker host.
**Container exited unexpectedly**: Check `docker logs tao-job-<job_id>`, the
configured `DOCKER_NETWORK`, and the command produced by the SDK action runner.
**Path missing inside container**: A local path on the host is not necessarily
mounted into the job container. Use a path convention supported by the action
runner or configure an explicit volume through the surrounding service.
모든 파일
6개 파일tao-run-on-local-docker 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/NVIDIA/skills/tree/main/skills/tao-run-on-local-docker # Copy SKILL.md to your .claude/skills/ directory
복사





집
