Skip to content

Commit

Permalink
update rapids-s3-path references
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Sep 13, 2023
1 parent 872ae66 commit adcf564
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
12 changes: 6 additions & 6 deletions tools/_rapids-download-from-s3
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
# The script can be used locally and in CI.
# Positional Arguments:
# 1) path to s3 artifact
# 2) location to untar it to
# 2) http path to s3 artifact
# 3) location to untar it to
set -euo pipefail
source rapids-constants

s3_dl_path="$1"
untar_dest="$2"
http_dl_path="$2"
untar_dest="$3"

mkdir -p "${untar_dest}"

if [ "${CI:-false}" = "false" ]; then
# shellcheck disable=SC2001
s3_dl_path=$(echo "${s3_dl_path}" | sed "s|s3://${RAPIDS_DOWNLOADS_BUCKET}|https://${RAPIDS_DOWNLOADS_DOMAIN}|")
rapids-echo-stderr "Downloading and decompressing ${s3_dl_path} into ${untar_dest}"
wget -qO- "${s3_dl_path}" | tar xzf - -C "${untar_dest}"
rapids-echo-stderr "Downloading and decompressing ${http_dl_path} into ${untar_dest}"
wget -qO- "${http_dl_path}" | tar xzf - -C "${untar_dest}"
else
rapids-echo-stderr "Downloading and decompressing ${s3_dl_path} into ${untar_dest}"
aws s3 cp --only-show-errors "${s3_dl_path}" - | tar xzf - -C "${untar_dest}"
Expand Down
3 changes: 2 additions & 1 deletion tools/rapids-download-from-s3
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if [ -z "$1" ] || [ -z "$2" ]; then
fi

s3_dl_path="$(rapids-s3-path)$1"
http_dl_path="$(rapids-http-path)$1"
untar_dest="$2"

_rapids-download-from-s3 "$s3_dl_path" "$untar_dest"
_rapids-download-from-s3 "$s3_dl_path" "$http_dl_path" "$untar_dest"
3 changes: 2 additions & 1 deletion tools/rapids-get-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -euo pipefail
source rapids-constants

s3_dl_path="s3://${RAPIDS_DOWNLOADS_BUCKET}/${1}"
http_dl_path="https://${RAPIDS_DOWNLOADS_DOMAIN}/${1}"
untar_dest=$(mktemp -d)

_rapids-download-from-s3 "$s3_dl_path" "$untar_dest"
_rapids-download-from-s3 "$s3_dl_path" "$http_dl_path" "$untar_dest"
2 changes: 1 addition & 1 deletion tools/rapids-upload-artifacts-dir
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ else
fi

echo ""
ARTIFACTS_URL=$(rapids-s3-path | sed "s|s3://${RAPIDS_DOWNLOADS_BUCKET}|https://${RAPIDS_DOWNLOADS_DOMAIN}|")
ARTIFACTS_URL=$(rapids-http-path)
echo "Browse all uploads (NVIDIA Employee VPN Required): ${ARTIFACTS_URL}"

0 comments on commit adcf564

Please sign in to comment.