Debian Codegraph @

conda/faiss-gpu-cuvs/build-pkg.sh

raw
1 #!/bin/sh
2 # Copyright (c) Meta Platforms, Inc. and affiliates.
3 #
4 # This source code is licensed under the MIT license found in the
5 # LICENSE file in the root directory of this source tree.
6
7 set -e
8
9
10 # Build swigfaiss.so/swigfaiss_avx2.so/swigfaiss_avx512.so
11 cmake -B _build_python_${PY_VER} \
12 -Dfaiss_ROOT=_libfaiss_stage/ \
13 -DFAISS_OPT_LEVEL=avx512 \
14 -DFAISS_ENABLE_GPU=ON \
15 -DFAISS_ENABLE_CUVS=ON \
16 -DCMAKE_BUILD_TYPE=Release \
17 -DPython_EXECUTABLE=$PYTHON \
18 faiss/python
19
20 make -C _build_python_${PY_VER} -j$(nproc) swigfaiss swigfaiss_avx2 swigfaiss_avx512
21
22 # Build actual python module.
23 cd _build_python_${PY_VER}/
24 $PYTHON setup.py install --single-version-externally-managed --record=record.txt --prefix=$PREFIX