File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,22 @@ RUN apt-get -y --no-install-recommends install build-essential curl ca-certifica
1616RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* && find /var/log -type f -delete
1717# Update CA certificates
1818RUN update-ca-certificates
19- # Create code directory
20- RUN mkdir -p /code
2119
22- # Clone only specific subdirectory of CUDA samples needed for deviceQuery
23- WORKDIR /code
24- RUN apt-get update \
25- && apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
26- python3 python-is-python3 ninja-build meson git curl \
27- && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
28- && update-ca-certificates
2920
30- # build and move deviceQuery to /usr/bin
21+ # Install NVIDIA CUDA samples to get deviceQuery
3122RUN mkdir -p /code && \
32- git clone --depth 1 https://github.com/NVIDIA/cuda-samples.git /code/cuda-samples && \
33- cd /code/cuda-samples/Samples/1_Utilities/deviceQuery && \
34- make && \
35- mv deviceQuery /usr/local/bin
23+ git clone --depth 1 --filter=blob:none --sparse https://github.com/NVIDIA/cuda-samples.git /code/cuda-samples && \
24+ cd /code/cuda-samples && \
25+ git sparse-checkout set Samples/1_Utilities/deviceQuery Common
26+
27+ # Build deviceQuery in its original location where it can find dependencies
28+ WORKDIR /code/cuda-samples/Samples/1_Utilities/deviceQuery
29+ RUN mkdir build && cd build && \
30+ cmake .. && \
31+ make -j$(nproc) && \
32+ cp deviceQuery /usr/local/bin/ && \
33+ cd /code && \
34+ rm -rf cuda-samples
3635
3736WORKDIR /app
3837COPY ./build-ffmpeg /app/build-ffmpeg
You can’t perform that action at this time.
0 commit comments