File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -152,21 +152,30 @@ RUN dpkg-deb --build --root-owner-group libtensorflow-cc_${TF_VERSION}${GPU_POST
152152 rm -rf libtensorflow-cc_${TF_VERSION}${GPU_POSTFIX}/
153153
154154# copy pip package, if built
155- ARG BUILD_PIP_PACKAGE=0
155+ ARG BUILD_PIP_PACKAGE
156156COPY --from=build /tmp/tensorflow/pip/tensorflow*.whl /
157157
158158# --- final stage with TensorFlow Python and C++ Library -----------------------
159159FROM --platform=amd64 tensorflow/tensorflow:${TF_VERSION}${GPU_POSTFIX} as final-amd64
160- ARG TARGETARCH
161160
162- # FROM ubuntu
163- FROM --platform=arm64 ubuntu:focal as final-arm64
164- ARG TARGETARCH
161+ FROM --platform=arm64 ubuntu:focal as final-base-arm64
165162
166- FROM --platform=arm64 nvcr.io/nvidia/l4t-tensorflow:r35.1.0-tf2.9-py3 as final-arm64-gpu
167- ARG TARGETARCH
163+ FROM --platform=arm64 rwthika/cuda:11.8-cudnn-trt-ubuntu20.04 as final-base-arm64-gpu
164+
165+ FROM "final-base-arm64${GPU_POSTFIX}" as final-arm64
166+
167+ # copy and install pip package, if built (not present in base image)
168+ ARG BUILD_PIP_PACKAGE
169+ COPY --from=deb-package /tensorflow*.whl /
170+ RUN if [ "${BUILD_PIP_PACKAGE}" = "1" ]; then \
171+ apt-get update && \
172+ apt-get install -y python3-pip && \
173+ python3 -m pip install --no-cache /tensorflow*.whl && \
174+ rm -rf /var/lib/apt/lists/*; \
175+ fi && \
176+ rm -rf /tensorflow*.whl
168177
169- FROM "final-${TARGETARCH}${GPU_POSTFIX} " as final
178+ FROM "final-${TARGETARCH}" as final
170179
171180ARG DEBIAN_FRONTEND=noninteractive
172181ARG TF_VERSION
You can’t perform that action at this time.
0 commit comments