Skip to content

Commit b6d6730

Browse files
author
Markus Perl
committed
Multiple packages updated
1 parent 68e7f4c commit b6d6730

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

cuda-ubuntu.dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN apt-get update
1313
RUN apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev libva-drm2 \
1414
python3 python-is-python3 ninja-build meson git curl
1515
# Clean up package cache and temporary files
16-
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
16+
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
1919
# Create code directory
@@ -22,13 +22,19 @@ RUN mkdir -p /code
2222
RUN git clone --depth 1 https://github.com/NVIDIA/cuda-samples.git /code/cuda-samples
2323
# Build deviceQuery
2424
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
25+
26+
RUN cd /code/cuda-samples/Samples/1_Utilities/deviceQuery && make && \
27+
mv deviceQuery /usr/local/bin && \
28+
rm -rf /code/cuda-samples
29+
30+
# Cleanup Image
31+
RUN rm -rf /opt/hostedtoolcache && cd /opt && find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';'
2732

2833
WORKDIR /app
2934
COPY ./build-ffmpeg /app/build-ffmpeg
3035

31-
RUN CUDA_COMPUTE_CAPABILITY=$(deviceQuery | grep Capability | head -n 1 | awk 'END {print $NF}' | tr -d '.') SKIPINSTALL=yes /app/build-ffmpeg --build --enable-gpl-and-non-free
36+
RUN CUDA_COMPUTE_CAPABILITY=$(deviceQuery | grep Capability | head -n 1 | awk 'END {print $NF}' | tr -d '.') SKIPINSTALL=yes /app/build-ffmpeg --build --enable-gpl-and-non-free && \
37+
rm -rf /app/workspace/ffmpeg* /app/workspace/build /app/workspace/packages \
3238

3339
FROM ubuntu:${UBUNTUVER} AS release
3440

0 commit comments

Comments
 (0)