Skip to content

Commit

Permalink
Start migration off defaults to conda-forge channel (facebookresearch…
Browse files Browse the repository at this point in the history
…#4126)

Summary: Pull Request resolved: facebookresearch#4126

Differential Revision: D68043874
  • Loading branch information
Michael Norris authored and facebook-github-bot committed Jan 11, 2025
1 parent 3d0ac32 commit 71972e8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,65 @@ runs:
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: '3.12'
miniconda-version: latest
- name: Configure build environment
shell: bash
run: |
# initialize Conda
echo "*****1*****"
conda config --show channels
echo "*****2*****"
conda config --show-sources
echo "*****2.1*****"
conda config --set solver libmamba
conda update -y -q conda
echo "*****2.2*****"
conda update -c conda-forge -y -q conda --override-channels
echo "$CONDA/bin" >> $GITHUB_PATH
echo "*****3*****"
conda config --show channels
echo "*****4*****"
conda install -y -q python=3.11 cmake=3.26 make=4.2 swig=4.0 "numpy<2" scipy=1.14 pytest=7.4 gflags=2.2
conda install -c conda-forge -y -q python=3.12 cmake=3.26 make=4.2 swig=4.0 "numpy<2" scipy=1.14 pytest=7.4 gflags=2.2 --override-channels
echo "*****5*****"
conda config --show channels
echo "*****6*****"
# install base packages for ARM64
if [ "${{ runner.arch }}" = "ARM64" ]; then
conda install -y -q -c conda-forge openblas=0.3 gxx_linux-aarch64=14.2 sysroot_linux-aarch64=2.17
conda install -c conda-forge -y -q openblas=0.3 gxx_linux-aarch64=14.2 sysroot_linux-aarch64=2.17 --override-channels
fi
# install base packages for X86_64
if [ "${{ runner.arch }}" = "X64" ]; then
# TODO: merge this with ARM64
conda install -y -q -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17
conda install -y -q mkl=2023 mkl-devel=2023
conda install -c conda-forge -y -q gxx_linux-64=14.2 sysroot_linux-64=2.17 --override-channels
conda install -c conda-forge -y -q mkl=2023 mkl-devel=2023 --override-channels
fi
# no CUDA needed for ROCm so skip this
if [ "${{ inputs.rocm }}" = "ON" ]; then
:
# regular CUDA for GPU builds
elif [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.cuvs }}" = "OFF" ]; then
conda install -y -q cuda-toolkit=12.4 -c "nvidia/label/cuda-12.4.0"
conda install -c conda-forge -y -q cuda-toolkit=12.4 -c "nvidia/label/cuda-12.4.0" --override-channels
# and CUDA from cuVS channel for cuVS builds
elif [ "${{ inputs.cuvs }}" = "ON" ]; then
conda install -y -q libcuvs=24.12 'cuda-version>=12.0,<=12.5' cuda-toolkit=12.4.1 gxx_linux-64=12.4 -c rapidsai -c conda-forge
conda install -c conda-forge -y -q libcuvs=24.12 'cuda-version>=12.0,<=12.5' cuda-toolkit=12.4.1 gxx_linux-64=12.4 -c rapidsai --override-channels
fi
# install test packages
if [ "${{ inputs.rocm }}" = "ON" ]; then
: # skip torch install via conda, we need to install via pip to get
# ROCm-enabled version until it's supported in conda by PyTorch
elif [ "${{ inputs.gpu }}" = "ON" ]; then
conda install -y -q "pytorch<2.5" pytorch-cuda=12.4 -c pytorch -c "nvidia/label/cuda-12.4.0"
conda install -c conda-forge -y -q "pytorch<2.5" pytorch-cuda=12.4 -c pytorch -c "nvidia/label/cuda-12.4.0" --override-channels
else
conda install -y -q "pytorch<2.5" -c pytorch
conda install -c conda-forge -y -q "pytorch<2.5" -c pytorch --override-channels
fi
echo "*****7*****"
conda config --show channels
- name: ROCm - Install dependencies
if: inputs.rocm == 'ON'
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/build_conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ runs:
with:
python-version: '3.11'
miniconda-version: latest
channels: conda-forge,nodefaults
conda-remove-defaults: "true"
- name: Install conda build tools
shell: ${{ steps.choose_shell.outputs.shell }}
run: |
Expand Down

0 comments on commit 71972e8

Please sign in to comment.