Skip to content

Commit 486c55f

Browse files
feat(docker): add UBI10 container image for FIPS compliance (#1499)
Add a UBI (Red Hat Universal Base Image) container variant for FIPS 140-3 compliant environments. - New `Dockerfile.ubi` using the same 3-stage pip-based build as the Ubuntu image - Unified `test_image.sh` covering both Ubuntu and UBI images - UBI image tags use `-ubi10` suffix (e.g. `latest-cu13-ubi10`) - Docs: README and install selector updated with UBI variant Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 98fc808 commit 486c55f

8 files changed

Lines changed: 261 additions & 13 deletions

File tree

.github/workflows/build_images.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,26 @@ jobs:
111111
run: |
112112
docker tag "nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-py${PYTHON_SHORT}-${ARCH}" "nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-py${PYTHON_SHORT}-${ARCH}"
113113
docker push "nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-py${PYTHON_SHORT}-${ARCH}"
114+
115+
- name: Build UBI10 image and push to DockerHub and NGC
116+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
117+
with:
118+
context: ./ci/docker/context
119+
file: ./ci/docker/Dockerfile.ubi
120+
push: true
121+
pull: true
122+
provenance: false
123+
sbom: false
124+
build-args: |
125+
CUDA_VER=${{ inputs.CUDA_VER }}
126+
CUOPT_VER=${{ inputs.CUOPT_VER }}
127+
tags: nvidia/cuopt:${{ inputs.IMAGE_TAG_PREFIX }}-cuda${{ steps.trim.outputs.CUDA_SHORT }}-ubi10-${{ matrix.ARCH }}
128+
129+
- name: Push UBI10 image to NGC
130+
env:
131+
IMAGE_TAG_PREFIX: ${{ inputs.IMAGE_TAG_PREFIX }}
132+
ARCH: ${{ matrix.ARCH }}
133+
CUDA_SHORT: ${{ steps.trim.outputs.CUDA_SHORT }}
134+
run: |
135+
docker tag "nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-${ARCH}" "nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-${ARCH}"
136+
docker push "nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-${ARCH}"

.github/workflows/test_images.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,20 @@ jobs:
6969
- name: Test cuopt
7070
run: |
7171
bash ./ci/docker/test_image.sh
72+
73+
test-ubi10:
74+
name: test-images-ubi10 (${{ inputs.ARCH }}, ${{ inputs.IMAGE_TAG_PREFIX }}-cuda${{ needs.prepare.outputs.CUDA_SHORT }}-ubi10)
75+
runs-on: "linux-${{ inputs.ARCH }}-gpu-a100-latest-1"
76+
needs: prepare
77+
container:
78+
image: "nvidia/cuopt:${{ inputs.IMAGE_TAG_PREFIX }}-cuda${{ needs.prepare.outputs.CUDA_SHORT }}-ubi10"
79+
steps:
80+
- name: Checkout code repo
81+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
82+
with:
83+
fetch-depth: 0
84+
ref: ${{ inputs.sha }}
85+
persist-credentials: false
86+
- name: Test cuopt
87+
run: |
88+
bash ./ci/docker/test_image.sh

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ of our latest development branch. Just replace `-c rapidsai` with `-c rapidsai-n
136136

137137
### Container
138138

139-
Users can pull the cuOpt container from the NVIDIA container registry.
139+
cuOpt ships two container variants on Docker Hub — an Ubuntu-based image for general use and a Red Hat Universal Base Image 10 (UBI10) image for FIPS 140-3 compliant environments.
140+
141+
#### Ubuntu image
140142

141143
```bash
142144
# For CUDA 12.x
@@ -146,9 +148,25 @@ docker pull nvidia/cuopt:latest-cu12
146148
docker pull nvidia/cuopt:latest-cu13
147149
```
148150

149-
Note: The ``latest`` tag is the latest stable release of cuOpt. If you want to use a specific version, you can use the ``<version>-cu12`` or ``<version>-cu13`` tag. For example, to use cuOpt 26.6.0, you can use the ``26.6.0-cu12`` or ``26.6.0-cu13`` tag. Fully-qualified tags that also pin the CUDA minor and Python version (for example ``26.6.0-cuda12.9-py3.14``) are published alongside the short tags. Please refer to [cuOpt dockerhub page](https://hub.docker.com/r/nvidia/cuopt/tags) for the list of available tags.
151+
The `latest` tag is the latest stable release. To pin a specific version use `<version>-cu12` / `<version>-cu13` (e.g. `26.6.0-cu13`). Fully-qualified tags that also pin the CUDA minor and Python version (e.g. `26.6.0-cuda13.3-py3.14`) are published alongside the short tags. See the [cuOpt Docker Hub page](https://hub.docker.com/r/nvidia/cuopt/tags) for the full list.
152+
153+
#### UBI10 image (FIPS 140-3)
154+
155+
Based on Red Hat Universal Base Image 10 (RHEL 10), which ships OpenSSL 3.5 validated under FIPS 140-3. Use this image in environments with strict FIPS or RHEL compliance requirements.
156+
157+
```bash
158+
# For CUDA 12.x
159+
docker pull nvidia/cuopt:latest-cu12-ubi10
160+
161+
# For CUDA 13.x
162+
docker pull nvidia/cuopt:latest-cu13-ubi10
163+
```
164+
165+
Fully-qualified tags follow the pattern `<version>-cuda<X.Y>-ubi10` (e.g. `26.6.0-cuda13.3-ubi10`). Nightly builds use the `<version>a-cu<N>-ubi10` tag scheme. See the [cuOpt Docker Hub page](https://hub.docker.com/r/nvidia/cuopt/tags) for the full list.
166+
167+
Both images include the same cuOpt packages (`libcuopt`, `cuopt`, `cuopt-server`, `cuopt-sh-client`) and expose the same server entrypoint. They are built and tested for x86-64 and ARM64.
150168

151-
Nightly container images are built from the HEAD of the development branch. They are tagged as ``<version>a-cu12`` or ``<version>a-cu13`` (note the ``a`` alpha suffix). See the [cuOpt dockerhub page](https://hub.docker.com/r/nvidia/cuopt/tags) for the full list.
169+
Nightly container images for both variants are built from the HEAD of the development branch. They are tagged as `<version>a-cu12` / `<version>a-cu13` (Ubuntu) and `<version>a-cu12-ubi10` / `<version>a-cu13-ubi10` (UBI10).
152170

153171
More information about the cuOpt container can be found [here](https://docs.nvidia.com/cuopt/user-guide/latest/cuopt-server/quick-start.html#container-from-docker-hub).
154172

ci/docker/Dockerfile.ubi

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# syntax=docker/dockerfile:1.2
2+
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
ARG CUDA_VER=unset
6+
ARG CUOPT_VER=unset
7+
8+
# Stage 1: source for libnvrtc / libnvJitLink (not in base image)
9+
FROM nvcr.io/nvidia/cuda:${CUDA_VER}-runtime-ubi10 AS cuda-libs
10+
11+
# Stage 2: source for CUDA headers needed for CuPy/NVRTC runtime compilation
12+
FROM nvcr.io/nvidia/cuda:${CUDA_VER}-devel-ubi10 AS cuda-headers
13+
14+
# Stage 3: small base — install Python + cuOpt via pip
15+
FROM nvcr.io/nvidia/cuda:${CUDA_VER}-base-ubi10 AS python-env
16+
17+
ARG CUDA_VER
18+
ARG CUOPT_VER
19+
20+
# gcc is required for building psutils
21+
RUN dnf install -y \
22+
gcc \
23+
python3-devel \
24+
python3-pip \
25+
&& dnf clean all \
26+
&& python3 -m pip install --upgrade pip
27+
28+
RUN alternatives --install /usr/bin/python python /usr/bin/python3 100
29+
30+
FROM python-env AS install-env
31+
32+
ARG CUDA_VER
33+
ARG CUOPT_VER
34+
35+
RUN \
36+
cuda_suffix=cu$(echo ${CUDA_VER} | cut -d'.' -f1) && \
37+
cuda_major_minor=$(echo ${CUDA_VER} | cut -d'.' -f1-2) && \
38+
python -m pip install \
39+
--extra-index-url https://pypi.nvidia.com \
40+
--extra-index-url https://pypi.anaconda.org/rapidsai-wheels-nightly/simple \
41+
--no-cache-dir \
42+
"pyyaml" \
43+
"cuopt-server-${cuda_suffix}==${CUOPT_VER}" \
44+
"cuopt-${cuda_suffix}==${CUOPT_VER}" \
45+
"libcuopt-${cuda_suffix}==${CUOPT_VER}" \
46+
"cuopt-sh-client==${CUOPT_VER}" && \
47+
python -m pip list
48+
49+
# Remove build-only deps to reduce CVE surface area
50+
RUN dnf remove -y gcc && dnf clean all
51+
52+
FROM install-env AS cuopt-final
53+
54+
# On UBI10: libcuopt, cuopt, rapids_logger install to lib64; cuopt_server to lib.
55+
ENV PATH="/usr/local/cuda/bin:/usr/bin:/usr/local/bin:/usr/local/nvidia/bin/:/usr/local/lib64/python3.12/site-packages/libcuopt/bin:${PATH}"
56+
ENV LD_LIBRARY_PATH="/usr/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/lib/wsl/lib:/usr/local/lib64/python3.12/site-packages/libcuopt/lib64/:/usr/local/lib64/python3.12/site-packages/rapids_logger/lib64:/usr/local/lib/python3.12/site-packages/nvidia/cu13/lib:${LD_LIBRARY_PATH}"
57+
58+
# Directory creation, permissions
59+
RUN mkdir -p /opt/cuopt && \
60+
chmod 777 /opt/cuopt && \
61+
chmod -R 755 /usr/local/lib64/python3.12/site-packages/cuopt* && \
62+
chmod -R 755 /usr/local/lib64/python3.12/site-packages/libcuopt* && \
63+
chmod -R 755 /usr/local/lib/python3.12/site-packages/cuopt_* && \
64+
chmod -R 755 /usr/local/bin/*
65+
66+
WORKDIR /opt/cuopt
67+
68+
COPY ./LICENSE ./VERSION ./THIRD_PARTY_LICENSES ./COMMIT_SHA ./COMMIT_TIME /opt/cuopt/
69+
70+
# Copy CUDA libraries from the runtime stage
71+
COPY --from=cuda-libs /usr/local/cuda/lib64/libnvrtc* /usr/local/cuda/lib64/
72+
COPY --from=cuda-libs /usr/local/cuda/lib64/libnvJitLink* /usr/local/cuda/lib64/
73+
74+
# Copy CUDA headers needed for runtime compilation (e.g., CuPy NVRTC)
75+
COPY --from=cuda-headers /usr/local/cuda/include/ /usr/local/cuda/include/
76+
77+
COPY ./entrypoint.sh /opt/cuopt/entrypoint.sh
78+
ENTRYPOINT ["/opt/cuopt/entrypoint.sh"]
79+
CMD ["python", "-m", "cuopt_server.cuopt_service"]

ci/docker/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,25 @@
44

55
Add all the files and data for the buildx context to ``context`` folder like entrypoint script, and others.
66

7+
## Dockerfiles
8+
9+
| File | Base | Use case |
10+
|------|------|----------|
11+
| `Dockerfile` | Ubuntu | General use |
12+
| `Dockerfile.ubi` | Red Hat UBI 10 (RHEL 10) | FIPS 140-3 compliant environments |
13+
14+
Both images install the same cuOpt packages via pip and expose the same server entrypoint.
15+
716
## test
817

9-
To test the container image, run the [test_image.sh](test_image.sh) script as shown below from the latest github repo:
18+
The [test_image.sh](test_image.sh) script is shared between both images. It detects the OS at runtime (`/etc/redhat-release` present → UBI10/RHEL, absent → Ubuntu) and adjusts package manager and library paths accordingly.
19+
20+
To test either image locally (requires a GPU):
1021

1122
```bash
23+
# Ubuntu image
1224
docker run -it --rm --gpus all -u root --volume $PWD:/repo -w /repo --entrypoint "/bin/bash" nvidia/cuopt:[TAG] ./ci/docker/test_image.sh
25+
26+
# UBI10 image
27+
docker run -it --rm --gpus all -u root --volume $PWD:/repo -w /repo --entrypoint "/bin/bash" nvidia/cuopt:[TAG]-ubi10 ./ci/docker/test_image.sh
1328
```

ci/docker/create_multiarch_manifest.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,43 @@ else
109109
echo "Skipping latest manifest creation (IMAGE_TAG_PREFIX='${IMAGE_TAG_PREFIX}' is not a release version)"
110110
fi
111111

112+
echo "=== Creating UBI10 manifests ==="
113+
create_manifest \
114+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10" \
115+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
116+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
117+
create_manifest \
118+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cu${CUDA_MAJOR}-ubi10" \
119+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
120+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
121+
122+
create_manifest \
123+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10" \
124+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
125+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
126+
create_manifest \
127+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cu${CUDA_MAJOR}-ubi10" \
128+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
129+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
130+
131+
if [[ "${IMAGE_TAG_PREFIX}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${IMAGE_TAG_PREFIX}" != *"a"* ]]; then
132+
create_manifest \
133+
"nvidia/cuopt:latest-cuda${CUDA_SHORT}-ubi10" \
134+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
135+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
136+
create_manifest \
137+
"nvidia/cuopt:latest-cu${CUDA_MAJOR}-ubi10" \
138+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
139+
"nvidia/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
140+
141+
create_manifest \
142+
"nvcr.io/nvstaging/nvaie/cuopt:latest-cuda${CUDA_SHORT}-ubi10" \
143+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
144+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
145+
create_manifest \
146+
"nvcr.io/nvstaging/nvaie/cuopt:latest-cu${CUDA_MAJOR}-ubi10" \
147+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-amd64" \
148+
"nvcr.io/nvstaging/nvaie/cuopt:${IMAGE_TAG_PREFIX}-cuda${CUDA_SHORT}-ubi10-arm64"
149+
fi
150+
112151
echo "=== Multi-architecture manifest creation completed ==="

ci/docker/test_image.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@
55

66
set -euo pipefail
77

8-
# Install dependencies
9-
apt-get update
10-
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends file bzip2 gcc
8+
# Detect distro and install test dependencies
9+
if [ -f /etc/redhat-release ]; then
10+
dnf install -y file bzip2 gcc wget unzip
11+
dnf clean all
12+
# pip-installed CUDA wheels land in a non-standard prefix on UBI/RHEL.
13+
# su - resets the environment, so carry the path forward explicitly.
14+
EXTRA_LD_PATH="/usr/local/lib/python3.12/site-packages/nvidia/cu13/lib"
15+
else
16+
apt-get update
17+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends file bzip2 gcc
18+
EXTRA_LD_PATH=""
19+
fi
1120

1221
# Download test data
1322
bash datasets/linear_programming/download_pdlp_test_dataset.sh
@@ -26,6 +35,11 @@ chmod -R a+w "$(pwd)"
2635
cat > /opt/cuopt/test.sh <<EOF
2736
set -euo pipefail
2837
38+
# Restore library path stripped by su - login shell
39+
if [ -n "${EXTRA_LD_PATH}" ]; then
40+
export LD_LIBRARY_PATH="${EXTRA_LD_PATH}:\${LD_LIBRARY_PATH:-}"
41+
fi
42+
2943
cd /opt/cuopt/cuopt
3044
python -m pip install pytest pexpect
3145
export RAPIDS_DATASET_ROOT_DIR=\$(realpath datasets)
@@ -41,8 +55,8 @@ python -m pytest python/cuopt_server/cuopt_server/tests/
4155
echo '----------------- CUOPT SERVER TEST END ---------------'
4256
EOF
4357

44-
# Create a temporary user with UID 888
45-
useradd -m -u 888 -s /bin/bash tempuser888
58+
# Create a temporary user with UID 1001 (within standard range for both Ubuntu and RHEL)
59+
useradd -m -u 1001 -s /bin/bash tempuser1001 2>/dev/null || true
4660

4761
# Switch to it
48-
su - tempuser888 -c "bash /opt/cuopt/test.sh"
62+
su - tempuser1001 -c "bash /opt/cuopt/test.sh"

docs/cuopt/source/_static/install-selector.js

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@
4747
default: "docker pull nvidia/cuopt:latest-cu13",
4848
run: "docker run --gpus all -it --rm nvidia/cuopt:latest-cu13 /bin/bash",
4949
},
50+
"cu12-ubi10": {
51+
default: "docker pull nvidia/cuopt:latest-cu12-ubi10",
52+
run: "docker run --gpus all -it --rm nvidia/cuopt:latest-cu12-ubi10 /bin/bash",
53+
},
54+
"cu13-ubi10": {
55+
default: "docker pull nvidia/cuopt:latest-cu13-ubi10",
56+
run: "docker run --gpus all -it --rm nvidia/cuopt:latest-cu13-ubi10 /bin/bash",
57+
},
5058
},
5159
nightly: {
5260
cu12: {
@@ -57,6 +65,14 @@
5765
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu13",
5866
run: "docker run --gpus all -it --rm nvidia/cuopt:" + V_NEXT + ".0a-cu13 /bin/bash",
5967
},
68+
"cu12-ubi10": {
69+
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu12-ubi10",
70+
run: "docker run --gpus all -it --rm nvidia/cuopt:" + V_NEXT + ".0a-cu12-ubi10 /bin/bash",
71+
},
72+
"cu13-ubi10": {
73+
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu13-ubi10",
74+
run: "docker run --gpus all -it --rm nvidia/cuopt:" + V_NEXT + ".0a-cu13-ubi10 /bin/bash",
75+
},
6076
},
6177
};
6278

@@ -214,6 +230,14 @@
214230
default: "docker pull nvidia/cuopt:latest-cu13",
215231
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:latest-cu13",
216232
},
233+
"cu12-ubi10": {
234+
default: "docker pull nvidia/cuopt:latest-cu12-ubi10",
235+
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:latest-cu12-ubi10",
236+
},
237+
"cu13-ubi10": {
238+
default: "docker pull nvidia/cuopt:latest-cu13-ubi10",
239+
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:latest-cu13-ubi10",
240+
},
217241
},
218242
nightly: {
219243
cu12: {
@@ -224,6 +248,14 @@
224248
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu13",
225249
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:" + V_NEXT + ".0a-cu13",
226250
},
251+
"cu12-ubi10": {
252+
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu12-ubi10",
253+
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:" + V_NEXT + ".0a-cu12-ubi10",
254+
},
255+
"cu13-ubi10": {
256+
default: "docker pull nvidia/cuopt:" + V_NEXT + ".0a-cu13-ubi10",
257+
run: "docker run --gpus all -it --rm -p 8000:8000 -e CUOPT_SERVER_PORT=8000 nvidia/cuopt:" + V_NEXT + ".0a-cu13-ubi10",
258+
},
227259
},
228260
},
229261
},
@@ -265,8 +297,11 @@
265297

266298
var cmd = "";
267299
if (method === "container") {
268-
var cudaKey = cuda || "cu12";
269-
var c = data[release][cudaKey] || data[release].cu12;
300+
var variant = getSelectedValue("cuopt-variant") || "ubuntu";
301+
var baseCuda = cuda || "cu12";
302+
var cudaKey = baseCuda + (variant === "ubi10" ? "-ubi10" : "");
303+
var fallbackKey = "cu12" + (variant === "ubi10" ? "-ubi10" : "");
304+
var c = data[release][cudaKey] || data[release][fallbackKey];
270305
var hubPull = c.default;
271306
var tag = "latest-cu12";
272307
var tm = hubPull.match(/docker pull nvidia\/cuopt:(\S+)/);
@@ -346,6 +381,10 @@
346381
hasCudaVariants(ifaceForVariants, method);
347382
cudaRow.style.display = showCuda ? "table-row" : "none";
348383
releaseRow.style.display = releaseVisible ? "table-row" : "none";
384+
var variantRow = document.getElementById("cuopt-variant-row");
385+
if (variantRow) {
386+
variantRow.style.display = method === "container" ? "table-row" : "none";
387+
}
349388
var registryRow = document.getElementById("cuopt-registry-row");
350389
if (registryRow) {
351390
registryRow.style.display = method === "container" ? "table-row" : "none";
@@ -395,6 +434,10 @@
395434
'<label class="cuopt-opt"><input type="radio" name="cuopt-cuda" value="cu12" checked> 12.x</label>' +
396435
'<label class="cuopt-opt"><input type="radio" name="cuopt-cuda" value="cu13"> 13.x</label>' +
397436
'</td></tr>' +
437+
'<tr id="cuopt-variant-row" style="display:none;"><td class="cuopt-opt-label">Variant</td><td class="cuopt-opt-group" role="group" aria-label="Container variant">' +
438+
'<label class="cuopt-opt"><input type="radio" name="cuopt-variant" value="ubuntu" checked> Ubuntu</label>' +
439+
'<label class="cuopt-opt"><input type="radio" name="cuopt-variant" value="ubi10"> UBI10 (FIPS 140-3)</label>' +
440+
'</td></tr>' +
398441
'<tr id="cuopt-registry-row" style="display:none;"><td class="cuopt-opt-label">Registry</td><td class="cuopt-opt-group" role="group" aria-label="Container registry">' +
399442
'<label class="cuopt-opt"><input type="radio" name="cuopt-registry" value="hub" checked> Docker Hub</label>' +
400443
'<label class="cuopt-opt"><input type="radio" name="cuopt-registry" value="ngc"> NVIDIA NGC</label>' +
@@ -405,7 +448,7 @@
405448
'<div class="cuopt-install-copy-wrap"><button type="button" id="cuopt-copy-btn" class="cuopt-install-copy-btn" style="display:none;">Copy command</button></div>' +
406449
"</div></div>";
407450

408-
["cuopt-iface", "cuopt-method", "cuopt-release", "cuopt-cuda", "cuopt-registry"].forEach(
451+
["cuopt-iface", "cuopt-method", "cuopt-release", "cuopt-cuda", "cuopt-variant", "cuopt-registry"].forEach(
409452
function (name) {
410453
var inputs = document.querySelectorAll('input[name="' + name + '"]');
411454
inputs.forEach(function (input) {

0 commit comments

Comments
 (0)