Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start migration off defaults to conda-forge channel #4126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ runs:
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
miniforge-version: latest # ensures conda-forge channel is used.
channels: conda-forge
conda-remove-defaults: 'true'
# Set to aarch64 if we're on arm64 because there's no miniforge ARM64 package, just aarch64.
# They are the same thing, just named differently.
architecture: ${{ runner.arch == 'ARM64' && 'aarch64' || runner.arch }}
- name: Configure build environment
shell: bash
run: |
# initialize Conda
conda config --set solver libmamba
# Ensure starting packages are from conda-forge.
conda list --show-channel-urls
conda update -y -q conda
echo "$CONDA/bin" >> $GITHUB_PATH
Expand All @@ -43,7 +50,7 @@ runs:
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 -y -q mkl=2022.2.1 mkl-devel=2022.2.1
fi
# no CUDA needed for ROCm so skip this
Expand All @@ -56,14 +63,17 @@ runs:
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
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 -y -q "pytorch=2.5.1=py3.11_cuda12.4_cudnn9.1.0_0" pytorch-cuda=12.4 -c pytorch -c "nvidia/label/cuda-12.4.1"
else
conda install -y -q "pytorch<2.5" -c pytorch
# conda install -y -q "pytorch=2.5.1=py3.11_cuda12.4_cudnn9.1.0_0" -c pytorch
fi
- name: ROCm - Install dependencies
if: inputs.rocm == 'ON'
Expand Down Expand Up @@ -174,3 +184,8 @@ runs:
with:
name: test-results-arch=${{ runner.arch }}-opt=${{ inputs.opt_level }}-gpu=${{ inputs.gpu }}-cuvs=${{ inputs.cuvs }}-rocm=${{ inputs.rocm }}
path: test-results
- name: Check installed packages channel
shell: bash
run: |
# Shows that all installed packages are from conda-forge.
conda list --show-channel-urls
20 changes: 15 additions & 5 deletions .github/actions/build_conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@ runs:
else
echo "shell=pwsh" >> "$GITHUB_OUTPUT"
fi
echo "${{ runner.arch }}"
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
miniforge-version: latest # ensures conda-forge channel is used.
channels: conda-forge
conda-remove-defaults: 'true'
# Set to aarch64 if we're on arm64 because there's no miniforge ARM64 package, just aarch64.
# They are the same thing, just named differently.
architecture: ${{ runner.arch == 'ARM64' && 'aarch64' || runner.arch }}
- name: Install conda build tools
shell: ${{ steps.choose_shell.outputs.shell }}
run: |
# Ensure starting packages are from conda-forge.
conda list --show-channel-urls
conda install -y -q "conda!=24.11.0"
conda install -y -q "conda-build!=24.11.0"
- name: Fix CI failure
shell: ${{ steps.choose_shell.outputs.shell }}
if: runner.os != 'Windows'
run: conda remove conda-anaconda-telemetry
- name: Enable anaconda uploads
if: inputs.label != ''
shell: ${{ steps.choose_shell.outputs.shell }}
Expand Down Expand Up @@ -94,3 +99,8 @@ runs:
run: |
conda build faiss-gpu-cuvs --variants '{ "cudatoolkit": "${{ inputs.cuda }}" }' \
--user pytorch --label ${{ inputs.label }} -c pytorch -c rapidsai -c rapidsai-nightly -c conda-forge -c nvidia
- name: Check installed packages channel
shell: bash
run: |
# Shows that all installed packages are from conda-forge.
conda list --show-channel-urls
8 changes: 4 additions & 4 deletions conda/faiss/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ outputs:
build:
- {{ compiler('cxx') }}
- sysroot_linux-64 =2.17 # [linux64]
- llvm-openmp # [osx]
- llvm-openmp # [osx or linux64]
- cmake >=3.24.0
- make =4.2 # [not win]
- mkl-devel =2023 # [x86_64]
- mkl-devel =2022.2.1 # [x86_64]
host:
- mkl =2023 # [x86_64]
- mkl =2022.2.1 # [x86_64]
- openblas =0.3 # [not x86_64]
run:
- mkl =2023 # [x86_64]
- mkl =2022.2.1 # [x86_64]
- openblas =0.3 # [not x86_64]
test:
requires:
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ set(FAISS_TEST_SRC
test_sliding_ivf.cpp
test_threaded_index.cpp
test_transfer_invlists.cpp
test_mem_leak.cpp
test_cppcontrib_sa_decode.cpp
test_cppcontrib_uintreader.cpp
test_simdlib.cpp
Expand Down
Loading