Skip to content

Commit 4816246

Browse files
Switch CI Docker image from Miniconda to Miniforge to avoid Anaconda rate limits
Replace Miniconda (which uses Anaconda's rate-limited default package repository) with Miniforge (which uses conda-forge). This resolves CI Docker image build failures caused by Anaconda ToS rate limits. This PR was authored with Claude. Agent-Logs-Url: https://github.com/pytorch/executorch/sessions/888dd7ec-0404-4883-b99c-d6b54cb95a05 Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
1 parent 80cd157 commit 4816246

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.ci/docker/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ OS_VERSION=22.04
1919
CLANG_VERSION=""
2020
GCC_VERSION=""
2121
PYTHON_VERSION=3.10
22-
MINICONDA_VERSION=23.10.0-1
22+
MINIFORGE_VERSION=24.11.3-0
2323
BUCK2_VERSION=$(cat ci_commit_pins/buck2.txt)
2424

2525
case "${IMAGE_NAME}" in
@@ -106,7 +106,7 @@ docker build \
106106
--build-arg "CLANG_VERSION=${CLANG_VERSION}" \
107107
--build-arg "GCC_VERSION=${GCC_VERSION}" \
108108
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
109-
--build-arg "MINICONDA_VERSION=${MINICONDA_VERSION}" \
109+
--build-arg "MINIFORGE_VERSION=${MINIFORGE_VERSION}" \
110110
--build-arg "TORCH_VERSION=${TORCH_VERSION}" \
111111
--build-arg "BUCK2_VERSION=${BUCK2_VERSION}" \
112112
--build-arg "LINTRUNNER=${LINTRUNNER:-}" \

.ci/docker/common/install_conda.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ set -ex
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13-
install_miniconda() {
14-
BASE_URL="https://repo.anaconda.com/miniconda"
15-
CONDA_FILE="Miniconda3-py${PYTHON_VERSION//./}_${MINICONDA_VERSION}-Linux-x86_64.sh"
13+
install_miniforge() {
14+
BASE_URL="https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}"
15+
CONDA_FILE="Miniforge3-${MINIFORGE_VERSION}-Linux-x86_64.sh"
1616
if [[ $(uname -m) == "aarch64" ]]; then
17-
CONDA_FILE="Miniconda3-py${PYTHON_VERSION//./}_${MINICONDA_VERSION}-Linux-aarch64.sh"
17+
CONDA_FILE="Miniforge3-${MINIFORGE_VERSION}-Linux-aarch64.sh"
1818
fi
1919

2020
mkdir -p /opt/conda
2121
chown ci-user:ci-user /opt/conda
2222

2323
pushd /tmp
2424
wget -q "${BASE_URL}/${CONDA_FILE}"
25-
# Install miniconda
25+
# Install miniforge
2626
as_ci_user bash "${CONDA_FILE}" -b -f -p "/opt/conda"
2727
# Clean up the download file
2828
rm "${CONDA_FILE}"
@@ -68,7 +68,7 @@ fix_conda_ubuntu_libstdcxx() {
6868
fi
6969
}
7070

71-
install_miniconda
71+
install_miniforge
7272
install_python
7373
install_pip_dependencies
7474
# Hack breaks the job on aarch64 but is still necessary everywhere

.ci/docker/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY ./common/install_docs_reqs.sh install_docs_reqs.sh
4444
RUN bash ./install_docs_reqs.sh && rm install_docs_reqs.sh
4545

4646
# Install conda and other dependencies
47-
ARG MINICONDA_VERSION
47+
ARG MINIFORGE_VERSION
4848
ARG PYTHON_VERSION
4949
ENV PYTHON_VERSION=$PYTHON_VERSION
5050
ENV PATH /opt/conda/envs/py_$PYTHON_VERSION/bin:/opt/conda/bin:$PATH

0 commit comments

Comments
 (0)