Skip to content

Commit dc32481

Browse files
author
Markus Perl
committed
Multiple packages updated
1 parent 0b0ac79 commit dc32481

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

cuda-ubuntu.dockerfile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@ RUN apt-get -y --no-install-recommends install build-essential curl ca-certifica
1616
RUN 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
1818
RUN 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
3122
RUN 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

3736
WORKDIR /app
3837
COPY ./build-ffmpeg /app/build-ffmpeg

0 commit comments

Comments
 (0)