diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 5867c04c7..bf3ecdc04 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -38,6 +38,8 @@ jobs: - '**' - '!CONTRIBUTING.md' - '!README.md' + - '!ci/release/update-version-cuopt.sh' + - '!ci/release/update-version-rapids.sh' - '!docs/**' - '!img/**' - '!notebooks/**' @@ -55,12 +57,16 @@ jobs: - '**' - '!CONTRIBUTING.md' - '!README.md' + - '!ci/release/update-version-cuopt.sh' + - '!ci/release/update-version-rapids.sh' - '!docs/**' - '!python/nvcf_client/**' test_python: - '**' - '!CONTRIBUTING.md' - '!README.md' + - '!ci/release/update-version-cuopt.sh' + - '!ci/release/update-version-rapids.sh' - '!docs/**' - '!img/**' - '!notebooks/**' @@ -69,6 +75,8 @@ jobs: - '**' - '!CONTRIBUTING.md' - '!README.md' + - '!ci/release/update-version-cuopt.sh' + - '!ci/release/update-version-rapids.sh' - '!docs/**' - '!img/**' - '!notebooks/**' @@ -79,6 +87,8 @@ jobs: - '**' - '!CONTRIBUTING.md' - '!README.md' + - '!ci/release/update-version-cuopt.sh' + - '!ci/release/update-version-rapids.sh' - '!docs/**' - '!img/**' - '!notebooks/**' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d55e1da4..88bf495f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,7 +55,7 @@ repos: notebooks ) - repo: https://github.com/rapidsai/pre-commit-hooks - rev: v0.4.0 + rev: v0.6.0 hooks: - id: verify-copyright files: | @@ -71,7 +71,7 @@ repos: types_or: [file] args: ['-fallback-style=none', '-style=file', '-i'] - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.17.0 + rev: v1.18.1 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 4d1fc157a..2195e1ba8 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -56,5 +56,3 @@ sccache --show-adv-stats # remove build_cache directory to avoid uploading the entire source tree # tracked in https://github.com/prefix-dev/rattler-build/issues/1424 rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache - -rapids-upload-conda-to-s3 cpp diff --git a/ci/build_python.sh b/ci/build_python.sh index 4e07ceabf..bcdd108e3 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -90,5 +90,3 @@ rattler-build build --recipe conda/recipes/cuopt-sh-client \ # remove build_cache directory to avoid uploading the entire source tree # tracked in https://github.com/prefix-dev/rattler-build/issues/1424 rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache - -rapids-upload-conda-to-s3 python diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index cf4e7ffc2..3abf5ca8f 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -22,6 +22,7 @@ package_dir=$2 source rapids-configure-sccache source rapids-date-string +source rapids-init-pip cd "${package_dir}" diff --git a/ci/build_wheel_cuopt.sh b/ci/build_wheel_cuopt.sh index cd0955560..cd49b6ffb 100755 --- a/ci/build_wheel_cuopt.sh +++ b/ci/build_wheel_cuopt.sh @@ -17,6 +17,9 @@ set -euo pipefail + +source rapids-init-pip + package_dir="python/cuopt" export SKBUILD_CMAKE_ARGS="-DCUOPT_BUILD_WHEELS=ON;-DDISABLE_DEPRECATION_WARNINGS=ON"; @@ -24,15 +27,15 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" # Download the libcuopt and cuopt-mps-parser wheel built in the previous step and make it # available for pip to find. -# Download the packages built in the previous step +# +# Using env variable PIP_CONSTRAINT (initialized by 'rapids-init-pip') is necessary to ensure the constraints +# are used when creating the isolated build environment. RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python) LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) -echo "libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUOPT_WHEELHOUSE}/libcuopt_*.whl)" >> /tmp/constraints.txt -echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> /tmp/constraints.txt -export PIP_CONSTRAINT="/tmp/constraints.txt" - +echo "libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUOPT_WHEELHOUSE}/libcuopt_*.whl)" >> "${PIP_CONSTRAINT}" +echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> "${PIP_CONSTRAINT}" EXCLUDE_ARGS=( --exclude "libraft.so" @@ -53,5 +56,3 @@ ci/build_wheel.sh cuopt ${package_dir} python -m auditwheel repair "${EXCLUDE_ARGS[@]}" -w ${RAPIDS_WHEEL_BLD_OUTPUT_DIR} ${package_dir}/dist/* ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" - -RAPIDS_PY_WHEEL_NAME="cuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/ci/build_wheel_cuopt_mps_parser.sh b/ci/build_wheel_cuopt_mps_parser.sh index fc922fab0..826b229e5 100755 --- a/ci/build_wheel_cuopt_mps_parser.sh +++ b/ci/build_wheel_cuopt_mps_parser.sh @@ -18,6 +18,8 @@ set -euo pipefail +source rapids-init-pip + package_dir="python/cuopt/cuopt/linear_programming" export SKBUILD_CMAKE_ARGS="-DCUOPT_BUILD_WHEELS=ON;-DDISABLE_DEPRECATION_WARNINGS=ON" @@ -35,5 +37,3 @@ ci/build_wheel.sh cuopt_mps_parser ${package_dir} python -m auditwheel repair -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" ${package_dir}/dist/* ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" - -RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/ci/build_wheel_cuopt_server.sh b/ci/build_wheel_cuopt_server.sh index 2f07644aa..c30b35000 100755 --- a/ci/build_wheel_cuopt_server.sh +++ b/ci/build_wheel_cuopt_server.sh @@ -15,14 +15,12 @@ # See the License for the specific language governing permissions and # limitations under the License. - set -euo pipefail +source rapids-init-pip + package_dir="python/cuopt_server" ci/build_wheel.sh cuopt_server ${package_dir} cp "${package_dir}/dist"/* "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}/" ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" - -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" -RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/ci/build_wheel_cuopt_sh_client.sh b/ci/build_wheel_cuopt_sh_client.sh index 1d86e6bb9..b1f4dabf8 100755 --- a/ci/build_wheel_cuopt_sh_client.sh +++ b/ci/build_wheel_cuopt_sh_client.sh @@ -17,10 +17,10 @@ set -euo pipefail +source rapids-init-pip + package_dir="python/cuopt_self_hosted" ci/build_wheel.sh cuopt_sh_client ${package_dir} cp "${package_dir}/dist"/* "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}/" ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" - -RAPIDS_PY_WHEEL_NAME="cuopt_sh_client" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/ci/build_wheel_libcuopt.sh b/ci/build_wheel_libcuopt.sh index 7c9101af3..be78e8963 100755 --- a/ci/build_wheel_libcuopt.sh +++ b/ci/build_wheel_libcuopt.sh @@ -16,6 +16,8 @@ set -euo pipefail +source rapids-init-pip + package_name="libcuopt" package_dir="python/libcuopt" @@ -29,11 +31,8 @@ else echo "Building in release mode" fi -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" - rapids-logger "Generating build requirements" -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python) echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> /tmp/constraints.txt export PIP_CONSTRAINT="/tmp/constraints.txt" @@ -75,5 +74,3 @@ mkdir -p final_dist python -m auditwheel repair "${EXCLUDE_ARGS[@]}" -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" ${package_dir}/dist/* ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" - -RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 cpp "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/ci/test_self_hosted_service.sh b/ci/test_self_hosted_service.sh index c64554883..f3e4678b3 100755 --- a/ci/test_self_hosted_service.sh +++ b/ci/test_self_hosted_service.sh @@ -17,6 +17,8 @@ set -euo pipefail +source rapids-init-pip + # Download the cuopt built in the previous step RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python) diff --git a/ci/test_wheel_cuopt.sh b/ci/test_wheel_cuopt.sh index da3ebec1e..1b77f23f7 100755 --- a/ci/test_wheel_cuopt.sh +++ b/ci/test_wheel_cuopt.sh @@ -17,8 +17,7 @@ set -euo pipefail -mkdir -p ./dist -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" +source rapids-init-pip # Download the packages built in the previous step RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" diff --git a/ci/test_wheel_cuopt_server.sh b/ci/test_wheel_cuopt_server.sh index 759b12ea9..7f999dba8 100755 --- a/ci/test_wheel_cuopt_server.sh +++ b/ci/test_wheel_cuopt_server.sh @@ -17,8 +17,7 @@ set -eou pipefail -mkdir -p ./dist -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" +source rapids-init-pip # Download the packages built in the previous step RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"