diff --git a/.circleci/config.yml b/.circleci/config.yml index c0b8401..27172d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,11 +45,8 @@ jobs: --file=./python/base/Dockerfile.base \ --tag=978928340082.dkr.ecr.us-east-1.amazonaws.com/${REPOSITORY}:${TAG}${TAG_SUFFIX} \ --tag=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX} \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache \ - --cache-to type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache,mode=max,image-manifest=true,oci-mediatypes=true \ --progress plain \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm64 \ --provenance=false \ --sbom=false \ --output type=registry,push=true \ @@ -69,6 +66,7 @@ jobs: - setup_buildkit_builder - run: name: Build and push python image + no_output_timeout: 60m # building Python can take a while, default timeout is 10m command: | REPOSITORY="deepnote/python" TAG="${PYTHON_VERSION}" @@ -79,11 +77,8 @@ jobs: --tag=978928340082.dkr.ecr.us-east-1.amazonaws.com/${REPOSITORY}:${TAG}${TAG_SUFFIX} \ --tag=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX} \ --build-arg CIRCLE_PULL_REQUEST=${CIRCLE_PULL_REQUEST} \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache \ - --cache-to type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache,mode=max,image-manifest=true,oci-mediatypes=true \ --progress plain \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm64 \ --provenance=false \ --sbom=false \ --output type=registry,push=true \ @@ -113,11 +108,8 @@ jobs: --tag=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX} \ --build-arg CIRCLE_PULL_REQUEST=${CIRCLE_PULL_REQUEST} \ --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache \ - --cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache \ - --cache-to type=registry,ref=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX}-buildcache,mode=max,image-manifest=true,oci-mediatypes=true \ --progress plain \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm64 \ --provenance=false \ --sbom=false \ --output type=registry,push=true \ diff --git a/python/conda/Dockerfile.conda b/python/conda/Dockerfile.conda index 7d7724d..db9705d 100644 --- a/python/conda/Dockerfile.conda +++ b/python/conda/Dockerfile.conda @@ -18,9 +18,20 @@ ENV CONDA_ALWAYS_YES=true # but that would require baking in the URLs for # different Miniconda installer versions into the Dockerfile. ARG PYTHON_VERSION -RUN wget --quiet "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" -O /tmp/miniconda.sh && \ +ARG TARGETARCH +RUN case "$TARGETARCH" in \ + amd64) MINICONDA_ARCH="x86_64" ;; \ + arm64) MINICONDA_ARCH="aarch64" ;; \ + *) echo "Unsupported TARGETARCH: $TARGETARCH" >&2; exit 1 ;; \ + esac && \ + wget --quiet "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${MINICONDA_ARCH}.sh" -O /tmp/miniconda.sh && \ /bin/bash /tmp/miniconda.sh -b -p /opt/conda && \ rm /tmp/miniconda.sh && \ + # Use community packages from conda-forge instead of Anaconda Inc. default channels + # which require accepting terms of service & using commercial license for orgs with more than 200 employees + /opt/conda/bin/conda config --add channels conda-forge && \ + /opt/conda/bin/conda config --remove channels defaults || true && \ + /opt/conda/bin/conda config --set channel_priority strict && \ # Install the correct version of python (as the time of writing, anaconda # installed python 3.11 by default) for parity with our base image /opt/conda/bin/conda install python=${PYTHON_VERSION} && \