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
16
16
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* && find /var/log -type f -delete
17
17
# Update CA certificates
18
18
RUN update-ca-certificates
19
- # Create code directory
20
- RUN mkdir -p /code
21
19
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
29
20
30
- # build and move deviceQuery to /usr/bin
21
+ # Install NVIDIA CUDA samples to get deviceQuery
31
22
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
36
35
37
36
WORKDIR /app
38
37
COPY ./build-ffmpeg /app/build-ffmpeg
You can’t perform that action at this time.
0 commit comments