Skip to content

Commit 41791b9

Browse files
authored
feat: add cuDNN and TensorRT (#7)
1 parent b7cf15b commit 41791b9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# syntax=docker/dockerfile:1
22
ARG PYTHON_VERSION=3.8
33
ARG CUDA_VERSION=11.8
4+
ARG CUDNN_VERSION=8.9.4.25
5+
ARG TENSORRT_VERSION=8.6.1.6
46
FROM python:$PYTHON_VERSION-slim AS base
57

68
# Install wget.
@@ -17,4 +19,15 @@ ENV PATH=/opt/conda/bin:$PATH
1719

1820
# Install CUDA.
1921
RUN conda install --channel nvidia --yes cuda-runtime="$CUDA_VERSION"
20-
RUN conda install -c conda-forge cudnn
22+
23+
# Install cuDNN and TensorRT.
24+
RUN wget --quiet https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.1-1_all.deb && \
25+
dpkg -i cuda-keyring_1.1-1_all.deb && \
26+
rm cuda-keyring_1.1-1_all.deb && \
27+
apt-get update && \
28+
apt-get install --yes \
29+
libcudnn8=$CUDNN_VERSION-1+cuda$CUDA_VERSION \
30+
libnvinfer-lean8=$TENSORRT_VERSION-1+cuda$CUDA_VERSION && \
31+
apt-get clean && \
32+
rm -rf /var/lib/apt/lists/*
33+

0 commit comments

Comments
 (0)