Skip to content

adding a build script for faiss-cpu package (faiss-wheel)#8436

Open
afsanjar wants to merge 19 commits into
ppc64le:masterfrom
afsanjar:master
Open

adding a build script for faiss-cpu package (faiss-wheel)#8436
afsanjar wants to merge 19 commits into
ppc64le:masterfrom
afsanjar:master

Conversation

@afsanjar

@afsanjar afsanjar commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • [x ] Have you checked and followed all the points mention in the CONTRIBUTING.MD
  • [ x] Have you validated script on UBI 9 container
  • [x ] Did you run the script(s) on fresh container with set -e option enabled and observe success ?
  • [ x] Did you have Legal approvals for patch files ?

@afsanjar
afsanjar requested review from cdeepali and rcarino5 July 19, 2026 13:28


echo "Installing dependencies..."
curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

@cdeepali cdeepali Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think EPEL repos can be used here. So pls remove Lns 31-33.
The wrapper script builds python version not available on RH repo from source - here

dnf install -y epel-release-latest-9.noarch.rpm
dnf update -y
dnf install -y \
python3.13 python3.13-devel python3.13-pip \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python3.13 python3.13-devel python3.13-pip \
python3.12 python3.12-devel python3.12-pip \

openblas-devel make gcc g++ cmake git automake autoconf

echo "Upgrading Python tools..."
python3.13 -m pip install --upgrade setuptools wheel build uv

@cdeepali cdeepali Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python3.13 -m pip install --upgrade setuptools wheel build uv
python3 -m pip install --upgrade setuptools wheel build uv

CP=$(python3.13 -c "import sysconfig; print(sysconfig.get_config_var('py_version_nodot'))")
uv build --wheel --config-setting wheel.py-api=cp$CP --extra-index-url $INDEX_URL_DEVPY

if ! (python3.13 -m pip install dist/faiss_cpu-$PACKAGE_VERSION-cp$CP-abi3-linux_ppc64le.whl ); then

@cdeepali cdeepali Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ! (python3.13 -m pip install dist/faiss_cpu-$PACKAGE_VERSION-cp$CP-abi3-linux_ppc64le.whl ); then
if ! (python3 -m pip install dist/faiss_cpu-$PACKAGE_VERSION-cp$CP-abi3-linux_ppc64le.whl ); then

echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
fi
# Run tests
python3.13 -m pip install scipy==1.17.0 sentence-transformers --extra-index-url $INDEX_URL_DEVPY

@cdeepali cdeepali Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python3.13 -m pip install scipy==1.17.0 sentence-transformers --extra-index-url $INDEX_URL_DEVPY
python3 -m pip install scipy==1.17.0 sentence-transformers --extra-index-url $INDEX_URL_DEVPY

echo "ERROR: test case not found"
exit 1
fi
if ! (python3.13 $TEST_PATH); then

@cdeepali cdeepali Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ! (python3.13 $TEST_PATH); then
if ! (python3 $TEST_PATH); then


git clone --recursive ${PACKAGE_URL}
cd ${PACKAGE_DIR}
echo -e "\n[tool.uv]\nenvironments = [\"python_version == '3.13'\"]" >> pyproject.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this package required only for Python 3.13?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants