Skip to content

Commit c554aa7

Browse files
authored
Merge pull request #2022 from rtg0795/r2.8
Fix Docker configs in r2.8 release branch
2 parents 16386c8 + 197d265 commit c554aa7

File tree

2 files changed

+33
-26
lines changed

2 files changed

+33
-26
lines changed

tensorflow_serving/tools/docker/Dockerfile.devel-gpu

+17-17
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ ENV CUDNN_VERSION=8.1.0.77
2424
ENV TF_TENSORRT_VERSION=7.2.2
2525
ENV CUDA=11.2
2626

27-
RUN apt-get update && apt-get install -y --no-install-recommends \
27+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && \
28+
apt-get update && apt-get install -y --no-install-recommends \
2829
automake \
2930
build-essential \
3031
ca-certificates \
@@ -59,26 +60,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5960
zip \
6061
zlib1g-dev \
6162
python3-distutils \
62-
python-distutils-extra \
63-
&& \
64-
apt-get clean && \
65-
rm -rf /var/lib/apt/lists/* && \
63+
python-distutils-extra && \
6664
find /usr/local/cuda-11.2/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
6765
rm /usr/lib/x86_64-linux-gnu/libcudnn_static_v8.a
6866

6967
# NOTE: libnvinfer uses cuda11.1 versions
70-
RUN apt-get update && \
71-
apt-get install -y --no-install-recommends libnvinfer7=${TF_TENSORRT_VERSION}-1+cuda11.1 \
72-
libnvinfer-dev=${TF_TENSORRT_VERSION}-1+cuda11.1 \
73-
libnvinfer-plugin-dev=${TF_TENSORRT_VERSION}-1+cuda11.1 \
74-
libnvinfer-plugin7=${TF_TENSORRT_VERSION}-1+cuda11.1 \
75-
# TODO: need to verify
76-
libnvonnxparsers7=${TF_TENSORRT_VERSION}-1+cuda11.1 \
77-
libnvparsers7=${TF_TENSORRT_VERSION}-1+cuda11.1\
78-
libnvonnxparsers-dev=${TF_TENSORRT_VERSION}-1+cuda11.1 \
79-
libnvparsers-dev=${TF_TENSORRT_VERSION}-1+cuda11.1 \
80-
&& apt-get clean \
81-
&& rm -rf /var/lib/apt/lists/*;
68+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub && \
69+
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/tensorRT.list && \
70+
apt-get update && \
71+
apt-get install -y --no-install-recommends libnvinfer7=${TF_TENSORRT_VERSION}-1+cuda11.0 \
72+
libnvinfer-dev=${TF_TENSORRT_VERSION}-1+cuda11.0 \
73+
libnvinfer-plugin-dev=${TF_TENSORRT_VERSION}-1+cuda11.0 \
74+
libnvinfer-plugin7=${TF_TENSORRT_VERSION}-1+cuda11.0 \
75+
# TODO: need to verify
76+
libnvonnxparsers7=${TF_TENSORRT_VERSION}-1+cuda11.0 \
77+
libnvparsers7=${TF_TENSORRT_VERSION}-1+cuda11.0\
78+
libnvonnxparsers-dev=${TF_TENSORRT_VERSION}-1+cuda11.0 \
79+
libnvparsers-dev=${TF_TENSORRT_VERSION}-1+cuda11.0 && \
80+
apt-get clean && \
81+
rm -rf /var/lib/apt/lists/*;
8282

8383
# Install python 3.7.
8484
RUN add-apt-repository ppa:deadsnakes/ppa && \

tensorflow_serving/tools/docker/Dockerfile.gpu

+16-9
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ ENV TF_TENSORRT_VERSION=7.2.2
3030
ENV CUDA=11.2
3131
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
3232

33-
RUN apt-get update && apt-get install -y --no-install-recommends \
33+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && \
34+
apt-get update && apt-get install -y --no-install-recommends \
3435
ca-certificates \
3536
cuda-command-line-tools-11-2 \
37+
cuda-nvrtc-11-2 \
3638
libcublas-11-2 \
3739
libcublas-dev-11-2 \
3840
libcufft-11-2 \
@@ -41,16 +43,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4143
libcusparse-11-2 \
4244
libcudnn8=${CUDNN_VERSION}-1+cuda${CUDA} \
4345
libgomp1 \
44-
&& \
45-
apt-get clean && \
46-
rm -rf /var/lib/apt/lists/*
46+
build-essential \
47+
curl \
48+
libfreetype6-dev \
49+
pkg-config \
50+
software-properties-common \
51+
unzip
4752

4853
# We don't install libnvinfer-dev since we don't need to build against TensorRT
49-
RUN apt-get update && \
50-
apt-get install -y --no-install-recommends libnvinfer7=${TF_TENSORRT_VERSION}-1+cuda11.1 \
51-
libnvinfer-plugin7=${TF_TENSORRT_VERSION}-1+cuda11.1 \
52-
&& apt-get clean \
53-
&& rm -rf /var/lib/apt/lists/*;
54+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub && \
55+
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/tensorRT.list && \
56+
apt-get update && \
57+
apt-get install -y --no-install-recommends libnvinfer7=${TF_TENSORRT_VERSION}-1+cuda11.0 \
58+
libnvinfer-plugin7=${TF_TENSORRT_VERSION}-1+cuda11.0 \
59+
&& apt-get clean && \
60+
rm -rf /var/lib/apt/lists/*;
5461

5562
# Install TF Serving GPU pkg
5663
COPY --from=build_image /usr/local/bin/tensorflow_model_server /usr/bin/tensorflow_model_server

0 commit comments

Comments
 (0)