Skip to content

Commit a6de803

Browse files
authored
stop uploading to downloads.rapids.ai, use rapids-init-pip in wheel CI (NVIDIA#50)
Contributes to rapidsai/build-planning#181 * removes all uploads of conda packages and wheels to `downloads.rapids.ai` (these are not used by anything in this repo any more) Contributes to rapidsai/build-planning#178 * prevents triggering expensive CI jobs based on PRs modifying `ci/release/update-version-*.sh` Contributes to rapidsai/build-planning#179 * adds a call to `rapids-init-pip` near the beginning of all CI scripts that use `pip` * removes redefinitions of `PIP_CONSTRAINT` in scripts, in favor of using the one set up by `rapids-pip-init` ## Notes for Reviewers ### How I identified changes Looked for uses of the relevant `gha-tools` tools, as well as documentation about `downloads.rapids.ai`, being on the NVIDIA VPN, using S3, etc. like this: ```shell git grep -i -E 's3|upload|downloads\.rapids|vpn' ``` ### How I tested this See "How I tested this" on rapidsai/shared-workflows#364 ### Haven't I seen these changes before? Yes, some of these changes were made in `rapidsai/cuopt` (rapidsai/cuopt#2503) but looks like they were lost when this new repo was created. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Ramakrishnap (https://github.com/rgsl888prabhu) URL: NVIDIA#50
1 parent 9f28899 commit a6de803

13 files changed

Lines changed: 33 additions & 30 deletions

.github/workflows/pr.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- '**'
3939
- '!CONTRIBUTING.md'
4040
- '!README.md'
41+
- '!ci/release/update-version-cuopt.sh'
42+
- '!ci/release/update-version-rapids.sh'
4143
- '!docs/**'
4244
- '!img/**'
4345
- '!notebooks/**'
@@ -55,12 +57,16 @@ jobs:
5557
- '**'
5658
- '!CONTRIBUTING.md'
5759
- '!README.md'
60+
- '!ci/release/update-version-cuopt.sh'
61+
- '!ci/release/update-version-rapids.sh'
5862
- '!docs/**'
5963
- '!python/nvcf_client/**'
6064
test_python:
6165
- '**'
6266
- '!CONTRIBUTING.md'
6367
- '!README.md'
68+
- '!ci/release/update-version-cuopt.sh'
69+
- '!ci/release/update-version-rapids.sh'
6470
- '!docs/**'
6571
- '!img/**'
6672
- '!notebooks/**'
@@ -69,6 +75,8 @@ jobs:
6975
- '**'
7076
- '!CONTRIBUTING.md'
7177
- '!README.md'
78+
- '!ci/release/update-version-cuopt.sh'
79+
- '!ci/release/update-version-rapids.sh'
7280
- '!docs/**'
7381
- '!img/**'
7482
- '!notebooks/**'
@@ -79,6 +87,8 @@ jobs:
7987
- '**'
8088
- '!CONTRIBUTING.md'
8189
- '!README.md'
90+
- '!ci/release/update-version-cuopt.sh'
91+
- '!ci/release/update-version-rapids.sh'
8292
- '!docs/**'
8393
- '!img/**'
8494
- '!notebooks/**'

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ repos:
5555
notebooks
5656
)
5757
- repo: https://github.com/rapidsai/pre-commit-hooks
58-
rev: v0.4.0
58+
rev: v0.6.0
5959
hooks:
6060
- id: verify-copyright
6161
files: |
@@ -71,7 +71,7 @@ repos:
7171
types_or: [file]
7272
args: ['-fallback-style=none', '-style=file', '-i']
7373
- repo: https://github.com/rapidsai/dependency-file-generator
74-
rev: v1.17.0
74+
rev: v1.18.1
7575
hooks:
7676
- id: rapids-dependency-file-generator
7777
args: ["--clean"]

ci/build_cpp.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,3 @@ sccache --show-adv-stats
5656
# remove build_cache directory to avoid uploading the entire source tree
5757
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
5858
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
59-
60-
rapids-upload-conda-to-s3 cpp

ci/build_python.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,3 @@ rattler-build build --recipe conda/recipes/cuopt-sh-client \
9090
# remove build_cache directory to avoid uploading the entire source tree
9191
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
9292
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
93-
94-
rapids-upload-conda-to-s3 python

ci/build_wheel.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package_dir=$2
2222

2323
source rapids-configure-sccache
2424
source rapids-date-string
25+
source rapids-init-pip
2526

2627
cd "${package_dir}"
2728

ci/build_wheel_cuopt.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,25 @@
1717

1818

1919
set -euo pipefail
20+
21+
source rapids-init-pip
22+
2023
package_dir="python/cuopt"
2124
export SKBUILD_CMAKE_ARGS="-DCUOPT_BUILD_WHEELS=ON;-DDISABLE_DEPRECATION_WARNINGS=ON";
2225

2326
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
2427

2528
# Download the libcuopt and cuopt-mps-parser wheel built in the previous step and make it
2629
# available for pip to find.
27-
# Download the packages built in the previous step
30+
#
31+
# Using env variable PIP_CONSTRAINT (initialized by 'rapids-init-pip') is necessary to ensure the constraints
32+
# are used when creating the isolated build environment.
2833
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
2934
CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
3035
LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
3136

32-
echo "libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUOPT_WHEELHOUSE}/libcuopt_*.whl)" >> /tmp/constraints.txt
33-
echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> /tmp/constraints.txt
34-
export PIP_CONSTRAINT="/tmp/constraints.txt"
35-
37+
echo "libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUOPT_WHEELHOUSE}/libcuopt_*.whl)" >> "${PIP_CONSTRAINT}"
38+
echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> "${PIP_CONSTRAINT}"
3639

3740
EXCLUDE_ARGS=(
3841
--exclude "libraft.so"
@@ -53,5 +56,3 @@ ci/build_wheel.sh cuopt ${package_dir}
5356
python -m auditwheel repair "${EXCLUDE_ARGS[@]}" -w ${RAPIDS_WHEEL_BLD_OUTPUT_DIR} ${package_dir}/dist/*
5457

5558
ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
56-
57-
RAPIDS_PY_WHEEL_NAME="cuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/build_wheel_cuopt_mps_parser.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
set -euo pipefail
2020

21+
source rapids-init-pip
22+
2123
package_dir="python/cuopt/cuopt/linear_programming"
2224

2325
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}
3537
python -m auditwheel repair -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" ${package_dir}/dist/*
3638

3739
ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
38-
39-
RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/build_wheel_cuopt_server.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
1918
set -euo pipefail
2019

20+
source rapids-init-pip
21+
2122
package_dir="python/cuopt_server"
2223

2324
ci/build_wheel.sh cuopt_server ${package_dir}
2425
cp "${package_dir}/dist"/* "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}/"
2526
ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
26-
27-
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
28-
RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/build_wheel_cuopt_sh_client.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
set -euo pipefail
1919

20+
source rapids-init-pip
21+
2022
package_dir="python/cuopt_self_hosted"
2123

2224
ci/build_wheel.sh cuopt_sh_client ${package_dir}
2325
cp "${package_dir}/dist"/* "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}/"
2426
ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
25-
26-
RAPIDS_PY_WHEEL_NAME="cuopt_sh_client" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/build_wheel_libcuopt.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
set -euo pipefail
1818

19+
source rapids-init-pip
20+
1921
package_name="libcuopt"
2022
package_dir="python/libcuopt"
2123

@@ -29,11 +31,8 @@ else
2931
echo "Building in release mode"
3032
fi
3133

32-
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
33-
3434
rapids-logger "Generating build requirements"
3535

36-
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
3736
CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
3837
echo "cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser*.whl)" >> /tmp/constraints.txt
3938
export PIP_CONSTRAINT="/tmp/constraints.txt"
@@ -75,5 +74,3 @@ mkdir -p final_dist
7574
python -m auditwheel repair "${EXCLUDE_ARGS[@]}" -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" ${package_dir}/dist/*
7675

7776
ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
78-
79-
RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 cpp "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

0 commit comments

Comments
 (0)