Skip to content

Commit 06152d9

Browse files
atalmanseemethere
andauthored
[cherry-pick][Docker builds] Move from Miniconda to Miniforge (pytorch#158370) (pytorch#158756)
* [Docker builds] Move from Miniconda to Miniforge (pytorch#158370) This is related to: https://www.anaconda.com/legal/terms/terms-of-service Trying to fix outage with docker builds. https://github.com/pytorch/pytorch/actions/runs/16298993712/job/46033590799 Rocm and XPU builds since they use Miniforge are not affected ``` pytorch#22 ERROR: process "/bin/sh -c bash ./install_conda.sh && rm install_conda.sh install_magma_conda.sh common_utils.sh /opt/conda/requirements-ci.txt /opt/conda/requirements-docs.txt" did not complete successfully: exit code: 1 ------ > [base 14/42] RUN bash ./install_conda.sh && rm install_conda.sh install_magma_conda.sh common_utils.sh /opt/conda/requirements-ci.txt /opt/conda/requirements-docs.txt: 11.93 CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding: 11.93 • https://repo.anaconda.com/pkgs/main 11.93 • https://repo.anaconda.com/pkgs/r 11.93 11.93 To accept a channel's Terms of Service, run the following and replace `CHANNEL` with the channel name/URL: 11.93 ‣ conda tos accept --override-channels --channel CHANNEL ``` Hence solution is: 1. using `` conda tos accept --override-channels --channel defaults`` 2. use Miniforge instead of Miniconda. Using solution 2. Solution Tried that don't work: 1. Using ``CONDA_ALWAYS_YES = true `` 4. Using older version of miniconda ``` [Miniconda3-py310_25.5.1-0-Linux-x86_64.sh](https://repo.anaconda.com/miniconda/Miniconda3-py310_25.5.1-0-Linux-x86_64.sh) ``` Pull Request resolved: pytorch#158370 Approved by: https://github.com/seemethere Co-authored-by: Eli Uriegas <[email protected]> * Remove tos --------- Co-authored-by: Eli Uriegas <[email protected]>
1 parent ad337e1 commit 06152d9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ set -ex
44

55
# Optionally install conda
66
if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
7-
BASE_URL="https://repo.anaconda.com/miniconda"
8-
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
9-
if [[ $(uname -m) == "aarch64" ]] || [[ "$BUILD_ENVIRONMENT" == *xpu* ]] || [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
10-
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
11-
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
12-
fi
7+
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
8+
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
139

1410
MAJOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 1)
1511
MINOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 2)
@@ -21,7 +17,6 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
2117
exit 1
2218
;;
2319
esac
24-
2520
mkdir -p /opt/conda
2621
chown jenkins:jenkins /opt/conda
2722

@@ -54,8 +49,6 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
5449
export SYSROOT_DEP="sysroot_linux-64=2.17"
5550
fi
5651

57-
# Please see: https://github.com/pytorch/pytorch/pull/158370#issuecomment-3084705725
58-
export CONDA_PLUGINS_AUTO_ACCEPT_TOS="yes"
5952
# Install correct Python version
6053
# Also ensure sysroot is using a modern GLIBC to match system compilers
6154
as_jenkins conda create -n py_$ANACONDA_PYTHON_VERSION -y\

0 commit comments

Comments
 (0)