1- ARG CUDAVER=12.6.2
1+ ARG CUDAVER=12.9.0
22ARG UBUNTUVER=22.04
33
44FROM nvidia/cuda:${CUDAVER}-devel-ubuntu${UBUNTUVER} AS build
@@ -7,18 +7,23 @@ ENV DEBIAN_FRONTEND=noninteractive
77ENV NVIDIA_VISIBLE_DEVICES=all
88ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
99
10- RUN apt-get update \
11- && apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
12- python3 python-is-python3 ninja-build meson git curl \
13- && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
14- && update-ca-certificates
15-
16- # build and move deviceQuery to /usr/bin
17- RUN mkdir -p /code && \
18- git clone --depth 1 https://github.com/NVIDIA/cuda-samples.git /code/cuda-samples && \
19- cd /code/cuda-samples/Samples/1_Utilities/deviceQuery && \
20- make && \
21- mv deviceQuery /usr/local/bin
10+ # Update package lists
11+ RUN apt-get update
12+ # Install required packages
13+ RUN apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
14+ python3 python-is-python3 ninja-build meson git curl
15+ # Clean up package cache and temporary files
16+ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
17+ # Update CA certificates
18+ RUN update-ca-certificates
19+ # Create code directory
20+ RUN mkdir -p /code
21+ # Clone CUDA samples repository
22+ RUN git clone --depth 1 https://github.com/NVIDIA/cuda-samples.git /code/cuda-samples
23+ # Build deviceQuery
24+ RUN cd /code/cuda-samples/Samples/1_Utilities/deviceQuery && make
25+ # Move deviceQuery binary to path
26+ RUN mv /code/cuda-samples/Samples/1_Utilities/deviceQuery/deviceQuery /usr/local/bin
2227
2328WORKDIR /app
2429COPY ./build-ffmpeg /app/build-ffmpeg
0 commit comments