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

explore 'pip --no-index' to more tightly control wheel builds #79

Open
jameslamb opened this issue Jul 2, 2024 · 1 comment
Open

explore 'pip --no-index' to more tightly control wheel builds #79

jameslamb opened this issue Jul 2, 2024 · 1 comment

Comments

@jameslamb
Copy link
Member

Description

It's common across RAPIDS to build a wheel in one CI job and then use it in another one (for example, building librmm and then using that in a later job that builds rmm).

#69 documents some cases where overly-flexible approaches for passing those wheels between jobs led to CI failing to catch broken wheels.

It also documents an approach that was taken to prevent that... in pseudo-code:

echo 'librmm-cu12 @ file://opt/downloads/dist/librmm_cu12.whl' > constraints.txt

PIP_CONSTRAINT=${PWD}/constraints.txt \
  pip wheel .

In https://github.com/rapidsai/kvikio/pull/397/files#r1657898551, @jakirkham recommended considering instead doing something like the following:

pip wheel \
  --no-index \
  --find-links /opt/download/dist/ \
  .

To close this issue, investigate that alternative approach and roll it out if it's found to be preferable.

Benefits of this work

Similar to #69, but with:

  • lower risk of silent issues caused by mistakes in generating a constraints.txt file
  • reduced risk of the portability issues that come with using file-based constraints (line endings, encodings, slashes in paths, etc.)

Acceptance Criteria

Approach

Test the approach by following something like "how I tested this" from rapidsai/rmm#1586

Notes

Opened this to defer investigation it further in #69, but I (@jameslamb) want to note one reservation for whenever this is picked up.

Using --no-index --find-links ${DIR} probably means that ${DIR} needs to contain all build dependencies (e.g. scikit-build-core, Cython, etc.)... so scripts would have to somehow provide for filling that directory with those, e.g. with pip download.

If that's true, it might just be simpler to completely stop using build isolation (e.g. stop passing --no-build-isolation) in wheel build jobs and set up the build environment with e.g. pip install or pip download (and then passing the other wheels from CI via constraints like --constraint /opt/download/dist/*.whl).

@vyasr
Copy link
Contributor

vyasr commented Jul 15, 2024

As discussed in #69 and #33, it seems like reasons are slowly piling up why we should just switch to building without isolation. Unfortunate, but so be it.

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

No branches or pull requests

2 participants