Skip to content

Commit bc02b80

Browse files
authored
No need to reinstall tensorflow-gpu (#1051)
The `tensorflow` package on `pip` supports both CPU & GPU.
1 parent 7eb0068 commit bc02b80

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gpu.Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ COPY --from=nvidia /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/cuda.gpg
1212
# See b/142337634#comment28
1313
RUN sed -i 's/deb https:\/\/developer.download.nvidia.com/deb http:\/\/developer.download.nvidia.com/' /etc/apt/sources.list.d/*.list
1414

15-
# Ensure the cuda libraries are compatible with the custom Tensorflow wheels.
16-
# TODO(b/120050292): Use templating to keep in sync or COPY installed binaries from it.
1715
ENV CUDA_MAJOR_VERSION=11
1816
ENV CUDA_MINOR_VERSION=0
1917
ENV CUDA_VERSION=$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION
@@ -82,9 +80,7 @@ RUN pip install jax==0.2.16 jaxlib==0.1.68+cuda$CUDA_MAJOR_VERSION$CUDA_MINOR_VE
8280
/tmp/clean-layer.sh
8381

8482
# Reinstall packages with a separate version for GPU support.
85-
RUN pip uninstall -y tensorflow && \
86-
pip install tensorflow-gpu==2.4.1 && \
87-
pip uninstall -y mxnet && \
83+
RUN pip uninstall -y mxnet && \
8884
pip install mxnet-cu$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION && \
8985
/tmp/clean-layer.sh
9086

0 commit comments

Comments
 (0)