Container-Based Task Creation
Container-Based Task Creation
A container task runs a Docker image on a GPU instance until the process exits. Use this approach for training jobs, batch inference, data processing, or any workload that runs to completion.
Container requirements
NVCT does not impose a server or health check requirement. The container only needs to:
- Perform its workload.
- Exit with code 0 on success, or a non-zero code on failure.
GPU drivers and CUDA libraries are available on the host. Use an image based on an appropriate CUDA base image for your workload.
Creating a container task
Example JSON configuration
GPU specification
Runtime limits
A task that exceeds maxRuntimeDuration moves to
EXCEEDED_MAX_RUNTIME_DURATION status. A task that is not scheduled within
maxQueuedDuration moves to EXCEEDED_MAX_QUEUED_DURATION status.
Secrets
Secrets are passed to the container as environment variables. Provide them via
--secrets NAME=value on the CLI or as a secrets array in the JSON file.
Secret values are stored encrypted and are not returned by default in task
detail responses.
To replace secrets on a running task:
Model and resource artifacts
Attach model or resource artifacts to a task using the --models and
--resources flags (format: name:version:uri) or via the JSON models and
resources arrays. These are made available to the container at runtime.
Result handling
Note: result upload is not yet supported in this release.
When resultHandlingStrategy is UPLOAD, the task uploads outputs to the
registry location specified in resultsLocation. After the task completes,
retrieve the results: