From cb8d6cf2f3ca8afd839285724873eea1f0e3fda3 Mon Sep 17 00:00:00 2001 From: Kevin DeShawn Date: Mon, 20 May 2024 14:23:43 -0500 Subject: [PATCH] add targetarch env --- docker/Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 2054a2e88e..c00b51aea2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ # CUDA Version # For a slim CPU-only image, leave the CUDA_VERSION argument blank -- e.g. # ARG CUDA_VERSION= -ARG CUDA_VERSION=11.3.1 +ARG CUDA_VERSION='' # Can use these to dynamically set the base image using the build matrix in the future. ARG LINUX_DISTRO='ubuntu' @@ -68,10 +68,7 @@ ARG COMPOSER_INSTALL_COMMAND='mosaicml[all]' FROM ${BASE_IMAGE} AS pytorch_stage -RUN echo "Building for platform: $TARGETPLATFORM" && \ - echo "OS: ${TARGETOS}" && \ - echo "Architecture: ${TARGETARCH}" && \ - echo "Variant: ${TARGETVARIANT}" +ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive @@ -211,13 +208,11 @@ ARG PILLOW_SIMD_VERSION COPY pillow_stub /tmp/pillow_stub RUN if [ "$TARGETARCH" = "amd64" ]; then \ - echo "Architecture: ${TARGETARCH}" && \ pip${PYTHON_VERSION} install --no-cache-dir --upgrade /tmp/pillow_stub && \ pip${PYTHON_VERSION} install --no-cache-dir --upgrade pillow_simd==${PILLOW_SIMD_VERSION} && \ rm -rf /tmp/pillow_stub; \ # Install Pillow as arm64 is not supported by pillow-simd, elif [ "$TARGETARCH" = "arm64" ]; then \ - echo "Architecture: ${TARGETARCH}" && \ pip${PYTHON_VERSION} install --no-cache-dir --upgrade Pillow==${PILLOW_PSEUDOVERSION}; \ fi