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

Revisit conditional dependency handling in wheels #14773

Closed
jakirkham opened this issue Jan 17, 2024 · 2 comments
Closed

Revisit conditional dependency handling in wheels #14773

jakirkham opened this issue Jan 17, 2024 · 2 comments

Comments

@jakirkham
Copy link
Member

Currently we have a bunch of logic that uses sed to change out bits of pyproject.toml. Wonder if there is a better option for handling this in pyproject.toml without needing sed

cudf/ci/build_wheel.sh

Lines 37 to 53 in 42e946f

if [[ ${package_name} == "dask-cudf" ]]; then
sed -r -i "s/cudf==(.*)\"/cudf${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file}
sed -r -i "s/dask-cuda==(.*)\"/dask-cuda==\1${alpha_spec}\"/g" ${pyproject_file}
sed -r -i "s/rapids-dask-dependency==(.*)\"/rapids-dask-dependency==\1${alpha_spec}\"/g" ${pyproject_file}
else
sed -r -i "s/rmm(.*)\"/rmm${PACKAGE_CUDA_SUFFIX}\1${alpha_spec}\"/g" ${pyproject_file}
# ptxcompiler and cubinlinker aren't version constrained
sed -r -i "s/ptxcompiler\"/ptxcompiler${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
sed -r -i "s/cubinlinker\"/cubinlinker${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
fi
if [[ $PACKAGE_CUDA_SUFFIX == "-cu12" ]]; then
sed -i "s/cuda-python[<=>\.,0-9a]*/cuda-python>=12.0,<13.0a0/g" ${pyproject_file}
sed -i "s/cupy-cuda11x/cupy-cuda12x/g" ${pyproject_file}
sed -i "/ptxcompiler/d" ${pyproject_file}
sed -i "/cubinlinker/d" ${pyproject_file}
fi

@bdice
Copy link
Contributor

bdice commented Jan 17, 2024

@jakirkham This is largely overlapping with rapidsai/dependency-file-generator#46. There's an open PR for resolving that but it has been stalled. That would solve some of these pieces, specifically the conditionals like [[ $PACKAGE_CUDA_SUFFIX == "-cu12" ]].

However, the alpha_spec piece would not be possible to implement with rapids-dependency-file-generator (at least, it would require a significant expansion of scope). Do you have thoughts on how to accomplish that without sed?

@vyasr
Copy link
Contributor

vyasr commented May 15, 2024

This is being solved with a combination of https://github.com/rapidsai/rapids-build-backend/ and rapidsai/pre-commit-hooks#28.

@vyasr vyasr closed this as completed May 15, 2024
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

3 participants