Encapsulate platform dependencies specifically for NVIDIA Jetson devices
1.2K
Docker image designed to encapsulate complex platform dependencies—such as CUDA, PyTorch, and CTranslate2—specifically for NVIDIA Jetson devices. Its primary purpose is to separate these low-level hardware requirements from application code. The text details the image's contents (Ubuntu base, Python environment, pre-built wheels), build prerequisites, and instructions for constructing it via helper scripts or Docker. Serves as the foundational layer in a three-tier image hierarchy (base → core → granite) for the modular ASR provider architecture.
The ASR project now uses a layered Docker image strategy:
| Layer | Image Name | Dockerfile | Purpose |
|---|---|---|---|
| Base | dheaps/jetson-asr-runtime:base-cuda13-2-sm110 (Thor) / dheaps/jetson-asr-runtime:base-cuda13-2-sm87 (Orin) | asr/base-image/Dockerfile | Platform dependencies only: CUDA userspace, PyTorch, torchaudio, CTranslate2, Python venv. No provider code. |
| Core | dheaps/jetson-asr-runtime:core-cuda13-2-sm110 / dheaps/jetson-asr-runtime:core-cuda13-2-sm87 | asr/Dockerfile.core | Base + faster-whisper and whisper-timestamped packages. Core app code (app.py, providers, entrypoint). |
| Granite | dheaps/jetson-asr-runtime:granite-cuda13-2-sm110 / dheaps/jetson-asr-runtime:granite-cuda13-2-sm87 | asr/Dockerfile.granite | Core + granite_speech provider. Extends core with IBM Granite Speech support. |
Dependency chain: base → core extends base → granite extends core
base-image/Dockerfile builds an image with:
/opt/venvasr/artifacts/ctranslate2torch and torchvisiontorchaudio wheel from asr/artifacts/torchaudioasr/requirements.txtIt intentionally does not copy ASR app source files.
When you pull or receive a built asr-runtime-base:* image, you are getting a runtime layer with the following contract:
ubuntu:24.04/app/opt/venv/opt/venv/bin is prepended to PATHCUDA_HOME=/usr/local/cudaCUDACXX=/usr/local/cuda/bin/nvcc/opt/ctranslate2/lib/usr/local/cudaPreinstalled Python stack includes:
torchtorchvisiontorchaudioasr/requirements.txt (system-level deps only; provider-specific packages like faster-whisper and whisper-timestamped are installed in the core layer)Preinstalled native/runtime assets include:
/opt/ctranslate2ffmpeg, libsndfile, libopenblas0, and libgomp1This means a downstream image can usually focus only on:
The built base image does not include:
app.py, providers/, or entrypoint.shIt is a dependency/runtime image, not a complete service image by itself.
The intended downstream pattern is:
ARG ASR_APP_BASE_IMAGE=dheaps/jetson-asr-runtime:base-cuda13-2-sm110
FROM ${ASR_APP_BASE_IMAGE}
WORKDIR /app
COPY ./*.py ./
COPY ./providers/*.py ./providers/
COPY ./entrypoint.sh ./
That is, the base image should be treated as a stable platform layer for ASR app images.
A consumer of the built image should assume:
runtime: nvidia or equivalent GPU device configurationIf you run the image directly without a downstream app layer, it will not start an ASR service because no app entrypoint is included.
./base-image/build-l4t-base.sh is the full base pipeline and includes:
base-image/Dockerfile../logs/build-l4t-base-steps/*It does not build the app container image.
/usr/local/cuda/bin/nvccasr/artifacts/ctranslate2asr/artifacts/torchaudio/torchaudio-*.whlFrom the asr/ directory:
./base-image/build-l4t-base.sh [profile] [cuda_arch]
Examples:
./base-image/build-l4t-base.sh
./base-image/build-l4t-base.sh thor
./base-image/build-l4t-base.sh orin 87
PUSH=1 IMAGE_REPO=my-registry.example.com/asr-runtime-base ./base-image/build-l4t-base.sh thor 110
The tag format is:
<IMAGE_REPO>:cuda<cuda-version-with-dashes>-sm<arch>
Example:
dheaps/jetson-asr-runtime:base-cuda13-2-sm110
docker build \
-f asr/base-image/Dockerfile \
-t asr-runtime-base:latest \
asr
Dockerfile.core)The core image extends base with provider packages:
ARG BASE_IMAGE=dheaps/jetson-asr-runtime:base-cuda13-2-sm110
FROM ${BASE_IMAGE} AS runtime
# pip install faster-whisper, whisper-timestamped
# Copy app code and providers
Build command:
docker compose --profile asr-core build
Dockerfile.granite)The granite image extends core with the granite_speech provider:
ARG BASE_IMAGE=dheaps/jetson-asr-runtime:core-cuda13-2-sm110
FROM ${BASE_IMAGE} AS runtime
# Copy granite_speech provider
Build command:
docker compose --profile asr-granite build
Dockerfile)The original asr/Dockerfile also consumes this base directly (unchanged from before):
ARG ASR_APP_BASE_IMAGE=dheaps/jetson-asr-runtime:base-cuda13-2-sm110
FROM ${ASR_APP_BASE_IMAGE}
The ASR_APP_BASE_IMAGE default is managed per-profile in profiles/$PROFILE/stack.env:
dheaps/jetson-asr-runtime:base-cuda13-2-sm110dheaps/jetson-asr-runtime:base-cuda13-2-sm87When building the app image, pass the base tag through compose/env:
ASR_APP_BASE_IMAGE=dheaps/jetson-asr-runtime:base-cuda13-2-sm110 docker compose --profile asr build
Build the app image separately with:
./build-asr-app.sh [profile] [cuda_arch]
# Step 1: Build base image (required first)
./base-image/build-l4t-base.sh thor 110
# Step 2: Build core image (depends on base)
docker compose --profile asr-core build
# Step 3: Build granite image (depends on core)
docker compose --profile asr-granite build
Compatibility notes:
asr/build-l4t-base.sh is a wrapper that delegates to asr/base-image/build-l4t-base.sh.asr/base-image/build-base-image.sh is a wrapper kept for backward compatibility.Content type
Image
Digest
sha256:490caae17…
Size
3.5 GB
Last updated
2 months ago
docker pull dheaps/jetson-asr-runtime