Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed May 12, 2024
1 parent b40d476 commit bb16d11
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

ARG SYSTEM=gpu
# NOTE: The following CUDA_VERSION, CUDNN_VERSION, and NVINFER_VERSION are for CUDA 11.8
# - this needs to match exactly with the host system otherwise the onnxruntime-gpu package isn't able to work correct. !!
ARG CUDA_VERSION=11-8
ARG CUDNN_VERSION=8.6.0.163-1
ARG NVINFER_VERSION=8.6.1.6-1

# Enroll NVIDIA GPG public key and install CUDA
RUN if [ "$SYSTEM" = "gpu" ]; then \

Check notice on line 16 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L16

Avoid additional packages by specifying `--no-install-recommends`

Check notice on line 16 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L16

Delete the apt-get lists after installing something

Check warning on line 16 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L16

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
Expand All @@ -17,21 +22,21 @@ RUN if [ "$SYSTEM" = "gpu" ]; then \
dpkg -i cuda-keyring_1.1-1_all.deb && \
apt-get update && apt-get install -y --no-install-recommends \
cuda-command-line-tools-11-8 \
cuda-cudart-dev-11-8 \
cuda-nvcc-11-8 \
cuda-cupti-11-8 \
cuda-nvprune-11-8 \
cuda-libraries-11-8 \
cuda-nvrtc-11-8 \
libcufft-11-8 \
libcurand-11-8 \
libcusolver-11-8 \
libcusparse-11-8 \
libcublas-11-8 \
cuda-cudart-dev-${CUDA_VERSION} \
cuda-nvcc-${CUDA_VERSION} \
cuda-cupti-${CUDA_VERSION} \
cuda-nvprune-${CUDA_VERSION} \
cuda-libraries-${CUDA_VERSION} \
cuda-nvrtc-${CUDA_VERSION} \
libcufft-${CUDA_VERSION} \
libcurand-${CUDA_VERSION} \
libcusolver-${CUDA_VERSION} \
libcusparse-${CUDA_VERSION} \
libcublas-${CUDA_VERSION} \
# - CuDNN: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#ubuntu-network-installation
libcudnn8=8.6.0.163-1+cuda11.8 \
libnvinfer-plugin8=8.6.1.6-1+cuda11.8 \
libnvinfer8=8.6.1.6-1+cuda11.8; \
libcudnn${CUDNN_VERSION%%.*}=${CUDNN_VERSION}+cuda${CUDA_VERSION.replace('-', '.')}; \
libnvinfer-plugin${CUDNN_VERSION%%.*}=${NVINFER_VERSION}+cuda${CUDA_VERSION.replace('-', '.')}; \
libnvinfer${CUDNN_VERSION%%.*}=${NVINFER_VERSION}+cuda${CUDA_VERSION.replace('-', '.')}; \
fi

RUN apt-get update && apt-get install -y --no-install-recommends \

Check warning on line 42 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L42

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check notice on line 42 in Dockerfile

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Dockerfile#L42

Use semicolon or linefeed before 'fi' (or quote to make it literal).
Expand Down

0 comments on commit bb16d11

Please sign in to comment.