Skip to content

Commit ad7a25f

Browse files
[release/2.6] Use miniforge instead of miniconda; pin to CMake 3.x; install sqlite (#2033)
* Using miniforge avoids rate limit errors when using miniconda installer and default conda package channel: `[2025-04-15T19:29:19.374Z] CondaHTTPError: HTTP 429 TERMS OF SERVICE RATE LIMIT EXCEEDED for url <https://repo.anaconda.com/pkgs/main/linux-64/repodata.json>` * However, conda-forge channel brings in CMake 4.0 by default, which is not compatible with older PyTorch release branches. Hence, pin CMake to 3.x * Also, miniforge installation of conda does *not* install sqlite conda package by default, hence explicitly install sqlite packages (needed in [install_rocm.sh](https://github.com/ROCm/pytorch/blob/use_miniforge_release_2.6/.ci/docker/common/install_rocm.sh#L60)) Validation: http://rocm-ci.amd.com/job/mainline-framework-pytorch-2.6-ub22-py3.10-ci/50/ --------- Co-authored-by: Pruthvi Madugundu <[email protected]> (cherry picked from commit 9d0a4a1)
1 parent 7010d60 commit ad7a25f

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.ci/docker/centos-rocm/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ RUN bash ./install_user.sh && rm install_user.sh
4141
# Install conda and other packages (e.g., numpy, pytest)
4242
ARG ANACONDA_PYTHON_VERSION
4343
ARG CONDA_CMAKE
44+
ARG BUILD_ENVIRONMENT
4445
ENV ANACONDA_PYTHON_VERSION=$ANACONDA_PYTHON_VERSION
4546
ENV PATH /opt/conda/envs/py_$ANACONDA_PYTHON_VERSION/bin:/opt/conda/bin:$PATH
4647
COPY requirements-ci.txt /opt/conda/requirements-ci.txt

.ci/docker/common/install_conda.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -ex
66
if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
77
BASE_URL="https://repo.anaconda.com/miniconda"
88
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
9-
if [[ $(uname -m) == "aarch64" ]] || [[ "$BUILD_ENVIRONMENT" == *xpu* ]]; then
9+
if [[ $(uname -m) == "aarch64" ]] || [[ "$BUILD_ENVIRONMENT" == *xpu* ]] || [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
1010
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
1111
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
1212
fi
@@ -64,6 +64,11 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
6464
# which is provided in libstdcxx 12 and up.
6565
conda_install libstdcxx-ng=12.3.0 --update-deps -c conda-forge
6666

67+
# Miniforge installer doesn't install sqlite by default
68+
if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
69+
conda_install sqlite
70+
fi
71+
6772
# Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README
6873
if [[ $(uname -m) == "aarch64" ]]; then
6974
conda_install "openblas==0.3.29=*openmp*"
@@ -80,7 +85,7 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
8085
# following builds that we know should use conda. Specifically, Ubuntu bionic
8186
# and focal cannot find conda mkl with stock cmake, so we need a cmake from conda
8287
if [ -n "${CONDA_CMAKE}" ]; then
83-
conda_install cmake
88+
conda_install cmake=3.31.6
8489
fi
8590

8691
# Magma package names are concatenation of CUDA major and minor ignoring revision

.ci/docker/ubuntu-rocm/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ RUN bash ./install_docs_reqs.sh && rm install_docs_reqs.sh
2525

2626
# Install conda and other packages (e.g., numpy, pytest)
2727
ARG ANACONDA_PYTHON_VERSION
28+
ARG BUILD_ENVIRONMENT
2829
ENV ANACONDA_PYTHON_VERSION=$ANACONDA_PYTHON_VERSION
2930
ENV PATH /opt/conda/envs/py_$ANACONDA_PYTHON_VERSION/bin:/opt/conda/bin:$PATH
3031
ARG CONDA_CMAKE

0 commit comments

Comments
 (0)