Skip to content

Commit ff44947

Browse files
authored
fix: CI docker build error for release 2.6 (#3360)
1 parent b387d4d commit ff44947

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/docker_builder.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
5555
echo "TRT VERSION = ${TRT_VERSION}"
5656
57-
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=$TRT_VERSION -f docker/Dockerfile --tag $DOCKER_TAG .
57+
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=$TRT_VERSION --build-arg USE_CXX11_ABI=1 -f docker/Dockerfile --tag $DOCKER_TAG .
5858
5959
- name: Push Docker image
6060
env:

docker/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Building a Torch-TensorRT container
22

3-
* Use `Dockerfile` to build a container which provides the exact development environment that our master branch is usually tested against.
3+
* Use `Dockerfile` to build a container which provides the exact development environment that our main branch is usually tested against.
44

55
* The `Dockerfile` currently uses <a href="https://github.com/bazelbuild/bazelisk">Bazelisk</a> to select the Bazel version, and uses the exact library versions of Torch and CUDA listed in <a href="https://github.com/pytorch/TensorRT#dependencies">dependencies</a>.
66
* The desired versions of TensorRT must be specified as build-args, with major and minor versions as in: `--build-arg TENSORRT_VERSION=a.b`
7-
* [**Optional**] The desired base image be changed by explicitly setting a base image, as in `--build-arg BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04`, though this is optional
7+
* [**Optional**] The desired base image be changed by explicitly setting a base image, as in `--build-arg BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04`, though this is optional.
88
* [**Optional**] Additionally, the desired Python version can be changed by explicitly setting a version, as in `--build-arg PYTHON_VERSION=3.10`, though this is optional as well.
99

10-
* This `Dockerfile` installs `pre-cxx11-abi` versions of Pytorch and builds Torch-TRT using `pre-cxx11-abi` libtorch as well.
10+
* This `Dockerfile` installs `pre-cxx11-abi` versions of Pytorch and builds Torch-TRT using `pre-cxx11-abi` libtorch as well. Update on 1/17/2025: In torch 2.6, `PRE_CXX11_ABI` is required for CUDA 11.8 and 12.4, while `USE_CXX11_ABI` is required for CUDA 12.6. As of torch 2.7, torch requires `USE_CXX11_ABI` for all CUDA 11.8, 12.4, and 12.6.
1111

1212
Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch-TRT. If you are using a workflow that requires a build of PyTorch on the CXX11 ABI (e.g. using the PyTorch NGC containers as a base image), add the Docker build argument: `--build-arg USE_CXX11_ABI=1`
1313

@@ -24,7 +24,7 @@ Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch
2424
2525
Build:
2626
```
27-
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=10.6.0 -f docker/Dockerfile -t torch_tensorrt:latest .
27+
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=10.6.0 --build-arg USE_CXX11_ABI=1 -f docker/Dockerfile -t torch_tensorrt:latest .
2828
```
2929

3030
Run:

0 commit comments

Comments
 (0)