You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Upgrade Docker build to use custom TRT + CUDNN
- Upgrade Ubuntu version to 22.04
- Make custom build args for TensorRT and CUDNN versions,
user-specifiable in a.b.c version format
- Make build args required, without defaults, to improve code
cleanliness and reduce amount of changes needed when versions shift
- Provide clear error messages when the build args are not provided by
the user
- Add documentation of the change in the Docker README
Copy file name to clipboardExpand all lines: docker/Dockerfile
+18-11Lines changed: 18 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,19 @@
1
1
# Base image starts with CUDA
2
-
ARG BASE_IMG=nvidia/cuda:11.7.1-devel-ubuntu20.04
2
+
ARG BASE_IMG=nvidia/cuda:11.7.1-devel-ubuntu22.04
3
3
FROM ${BASE_IMG} as base
4
4
5
+
ARG TENSORRT_VERSION
6
+
RUN test -n "$TENSORRT_VERSION" || (echo "No tensorrt version specified, please use --build-arg TENSORRT_VERSION==x.y.z to specify a version." && exit 1)
7
+
ARG CUDNN_VERSION
8
+
RUN test -n "$CUDNN_VERSION" || (echo "No cudnn version specified, please use --build-arg CUDNN_VERSION==x.y.z to specify a version." && exit 1)
Copy file name to clipboardExpand all lines: docker/README.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
* Use `Dockerfile` to build a container which provides the exact development environment that our master branch is usually tested against.
4
4
5
-
*`Dockerfile` currently uses the exact library versions (Torch, CUDA, CUDNN, TensorRT) listed in <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> to build Torch-TensorRT.
5
+
*The `Dockerfile` currently uses <ahref="https://github.com/bazelbuild/bazelisk">Bazelisk</a> to select the Bazel version, and uses the exact library versions of Torch and CUDAlisted in <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a>. The desired versions of CUDNN and TensorRT must be specified as build-args, with major, minor, and patch versions as in: `--build-arg TENSORRT_VERSION=a.b.c --build-arg CUDNN_VERSION=x.y.z`
6
6
7
7
* This `Dockerfile` installs `pre-cxx11-abi` versions of Pytorch and builds Torch-TRT using `pre-cxx11-abi` libtorch as well.
8
8
@@ -14,11 +14,14 @@ Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch
14
14
15
15
### Instructions
16
16
17
+
- The example below uses CUDNN 8.5.0 and TensorRT 8.5.1
18
+
- See <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> for a list of current default dependencies.
0 commit comments