Skip to content

Commit 26023e2

Browse files
committed
Update cudaqx-dev image to include tensorrt
1 parent 1b7f673 commit 26023e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docker/build_env/cudaqx.dev.Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ RUN apt-get update && CUDA_DASH=$(echo $cuda_version | tr '.' '-') \
2222
&& python3 -m pip install "cmake<4" --user \
2323
&& apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
2424

25+
# Install tensorrt-dev, unless this is CUDA 12 w/ arm64
26+
RUN CUDA_MAJOR_VERSION=$(echo $cuda_version | cut -d . -f1); \
27+
ARCH="${ARCH:-$(dpkg --print-architecture)}"; \
28+
if [ "$CUDA_MAJOR_VERSION" != "12" ] || [ "$ARCH" = "amd64" ]; then \
29+
apt-get update \
30+
&& apt-cache search tensorrt | awk '{print "Package: "$1"\nPin: version *+cuda'${cuda_version}'\nPin-Priority: 1001\n"}' | tee /etc/apt/preferences.d/tensorrt-cuda${cuda_version}.pref > /dev/null \
31+
&& apt update \
32+
&& apt-get install -y tensorrt-dev \
33+
&& apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/*; \
34+
fi
35+
2536
COPY .cudaq_version /cudaq_version
2637

2738
ENV CUDAQ_INSTALL_PREFIX=/usr/local/cudaq

0 commit comments

Comments
 (0)