feat(agent): add optional pinned CUDA deployment variant
This commit is contained in:
1 parent
495740292a
commit
5c52c0e8f9
32 files changed
+537
-81
No files matched your search
+26
-41
@@ -1,47 +1,32 @@
|
||||
# GPU device access and inference status
|
||||
|
||||
The default Agent uses `CPUExecutionProvider`. The published Agent image only
|
||||
contains the CPU ONNX Runtime package. `Agent__InferenceExecutionProvider`
|
||||
accepts `CPU` (the default) or `CUDA`; the current published image does not
|
||||
include the CUDA provider or its CUDA/cuDNN runtime libraries. A CUDA request in
|
||||
that image is logged and falls back to CPU. GPU detection and inventory report
|
||||
host hardware; they do not mean that frame inference is running on that
|
||||
hardware.
|
||||
The default Agent image and install path use `CPUExecutionProvider` and do not
|
||||
require NVIDIA. The optional amd64 CUDA image is built from
|
||||
`docker/Dockerfile.agent.gpu` and published as `eltruncho/heimdall-agent-gpu`.
|
||||
Its immutable image digest is stored in the signed `agent-image-gpu.json`
|
||||
release asset. Central offers the NVIDIA install option when that signed
|
||||
release metadata is present. Existing Agent Compose files remain CPU-only.
|
||||
|
||||
The production Agent Compose is generated in Central's UI. Save that file as
|
||||
`docker-compose.yml` on the camera host. To expose hardware for inventory,
|
||||
copy the matching optional overlay from this repository beside it, then run:
|
||||
ONNX Runtime 1.22 GPU uses CUDA 12.8 and cuDNN 9. The optional image pins NVIDIA
|
||||
`12.8.1-cudnn-runtime-ubuntu24.04` to amd64 manifest
|
||||
`sha256:9175fa92f96de35a8cfb9493f0dfcf9435c7a597e9d95ad41d2cae382a95e3f9` and
|
||||
uses the separate locked GPU NuGet dependency graph. See the [ONNX Runtime CUDA
|
||||
provider compatibility table](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html)
|
||||
and [NVIDIA CUDA image tag](https://hub.docker.com/r/nvidia/cuda/tags?name=12.8.1-cudnn-runtime-ubuntu24.04).
|
||||
|
||||
```sh
|
||||
# NVIDIA
|
||||
docker compose \
|
||||
-f docker-compose.yml \
|
||||
-f docker-compose.gpu-nvidia.yml \
|
||||
--profile gpu-nvidia-inventory up -d heimdall-agent
|
||||
The installer sets `Agent__InferenceExecutionProvider=CUDA` and requests all
|
||||
NVIDIA devices for that variant. CUDA initialization failure logs a warning
|
||||
and falls back to CPU. A physical GPU, compatible host driver and NVIDIA
|
||||
Container Toolkit are required; see the [NVIDIA Container Toolkit install guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
|
||||
|
||||
# AMD ROCm devices
|
||||
docker compose \
|
||||
-f docker-compose.yml \
|
||||
-f docker-compose.gpu-amd.yml \
|
||||
--profile gpu-amd-inventory up -d heimdall-agent
|
||||
The `docker-compose.gpu-{nvidia,amd,intel}.yml` files remain inventory-only
|
||||
overlays. For local development, the CPU default is
|
||||
`docker/docker-compose.agent.dev.yml`; use
|
||||
`docker/docker-compose.agent.dev.gpu-nvidia.yml` with `--profile gpu-nvidia` to
|
||||
select the opt-in CUDA runtime. Intel and AMD inventory hosts may need
|
||||
`VIDEO_GID` and `RENDER_GID` set to host group IDs that can access `/dev/dri`.
|
||||
|
||||
# Intel render device
|
||||
docker compose \
|
||||
-f docker-compose.yml \
|
||||
-f docker-compose.gpu-intel.yml \
|
||||
--profile gpu-intel-inventory up -d heimdall-agent
|
||||
```
|
||||
|
||||
For local development, use the same overlay with
|
||||
`docker/docker-compose.agent.dev.yml`. For Intel and AMD hosts, set `VIDEO_GID` and `RENDER_GID` to
|
||||
the host group IDs that can access `/dev/dri`. The NVIDIA option requires the
|
||||
NVIDIA Container Toolkit and Docker Compose GPU device reservations.
|
||||
|
||||
These overlays only expose devices for Agent inventory. They do not enable
|
||||
GPU-accelerated ONNX inference. The Agent project has an opt-in GPU package
|
||||
restore/build variant (`-p:HeimdallOnnxRuntime=GPU`) for provider/fallback
|
||||
development, but no GPU runtime image is published or selected by the install
|
||||
UI yet. Actual GPU inference still requires a compatible CUDA/cuDNN runtime,
|
||||
host driver access, image publication and installer selection, then validation
|
||||
on real supported hardware. CPU fallback is covered by local tests; hardware
|
||||
execution is not.
|
||||
The image and Compose build acceptance and physical CUDA execution have not
|
||||
been run for this change. Local tests cover CPU fallback, CPU/GPU installer
|
||||
configuration and signed CPU/GPU release manifests; hardware execution remains
|
||||
open.
|
||||
Reference in new issue
Block a user