From 905a56a9e509c9f6d92d8489bbf242e1b6c2a6e4 Mon Sep 17 00:00:00 2001 From: nlosg-utokan Date: Tue, 3 Jun 2025 22:21:08 +0100 Subject: [PATCH] Update Dockerfile for nvidia runtime Setting the runtime to default to nvidia as these are GPU nodes and will likely run GPU-accelerated workloads only. I'm happy to have this optional to avoid confusion but I think it's beneficial to include it for those wondering. --- docs/usage/advanced/cuda/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/usage/advanced/cuda/Dockerfile b/docs/usage/advanced/cuda/Dockerfile index 728be226c1..7948147135 100644 --- a/docs/usage/advanced/cuda/Dockerfile +++ b/docs/usage/advanced/cuda/Dockerfile @@ -12,6 +12,9 @@ RUN apt-get update && apt-get install -y curl \ tee /etc/apt/sources.list.d/nvidia-container-toolkit.list \ && apt-get update && apt-get install -y nvidia-container-toolkit \ && nvidia-ctk runtime configure --runtime=containerd + # Set alternative 'nvidia' runtime as default prior to container start. + # GPU nodes will always use the nvidia runtime without the need to explicitly define it. + && mkdir -p /etc/rancher/k3s && echo "default-runtime: nvidia" > /etc/rancher/k3s/config.yaml COPY --from=k3s / / --exclude=/bin COPY --from=k3s /bin /bin @@ -27,4 +30,4 @@ VOLUME /var/log ENV PATH="$PATH:/bin/aux" ENTRYPOINT ["/bin/k3s"] -CMD ["agent"] \ No newline at end of file +CMD ["agent"]