Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/cuda12.9-conda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,consistency=consistent",
"source=/etc/localtime,target=/etc/localtime,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../dask-cuda,target=/home/coder/dask-cuda,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/cuda12.9-pip/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,consistency=consistent",
"source=/etc/localtime,target=/etc/localtime,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../dask-cuda,target=/home/coder/dask-cuda,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/cuda13.0-conda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,consistency=consistent",
"source=/etc/localtime,target=/etc/localtime,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../dask-cuda,target=/home/coder/dask-cuda,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/cuda13.0-pip/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,consistency=consistent",
"source=/etc/localtime,target=/etc/localtime,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../dask-cuda,target=/home/coder/dask-cuda,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/rapids.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ENV LIBCUDF_KERNEL_CACHE_PATH="/home/coder/cudf/cpp/build/${PYTHON_PACKAGE_MANAG
ENV AWS_ROLE_ARN="arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs"
ENV SCCACHE_REGION="us-east-2"
ENV SCCACHE_BUCKET="rapids-sccache-devs"
ENV SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true
ENV SCCACHE_IDLE_TIMEOUT=0

###
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "devcontainer-utils",
"id": "utils",
"version": "25.12.0",
"version": "25.12.1",
"description": "A feature to install RAPIDS devcontainer utility scripts",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
92 changes: 65 additions & 27 deletions features/src/utils/opt/devcontainer/bin/sccache/dist/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
#
# Boolean options:
# -h,--help Print this text.
# --no-procs Don't print the number of sccache processes
# --no-stats Don't print the sccache stats
# --no-temps Don't print the number of sccache tempfiles
#
# Options that require values:
# -c|--col-width <num> Max column width in number of characters.
# String columns wider than this will be truncated with "...".
# (default: $COLUMNS)
# -f|--format (csv|tsv|json) The `sccache --dist-status` output format.
# (default: "json")
# (default: "tsv")
# -w,--watch <num> Watch status every <num> seconds (or 1s if <num> is unspecified).
#

_sccache_dist_status() {
Expand All @@ -26,18 +30,41 @@ _sccache_dist_status() {
# shellcheck disable=SC1091
. devcontainer-utils-debug-output 'devcontainer_utils_debug' 'sccache sccache-dist-status';

f="${f:-${format:-json}}";
c="${c:-${col_width:-${COLUMNS:-1000000000}}}";
if test ${#w[@]} -gt 0 && ! test -n "${w:+x}"; then
w="1";
fi

# Print current dist status to verify we're connected
sccache 2>/dev/null --dist-status \
| {
# Passthrough if the format is json
if test "$f" = json; then
cat - <(echo)
else
if ! test -n "${__SKIP_WATCH:+x}" && test -n "${w:+x}"; then
__SKIP_WATCH=1 watch -n "$w" devcontainer-utils-sccache-dist-status "${@}";
else

cat - | jq -r -f <(cat <<EOF
f="${f:-${format:-tsv}}";
c="${c:-${col_width:-${COLUMNS:-1000000000}}}";

if [[ "$f" != json ]] && ! test -n "${no_procs:+x}"; then
echo "sccache procs: $(pgrep sccache | wc -l)"
fi

if [[ "$f" != json ]] && ! test -n "${no_temps:+x}"; then
echo -n "preprocessed tempfiles: "
echo -n "$(ls -All /tmp/.sccache_temp/.tmp* 2>/dev/null | wc -l) "
echo " ($(du -ch /tmp/.sccache_temp/.tmp* 2>/dev/null | tail -n1 | cut -f1))"

echo -n "nvcc internal tempfiles: "
echo -n "$(ls -All /tmp/.sccache_temp/nvcc/*/* 2>/dev/null | wc -l)"
echo " ($(du -ch /tmp/.sccache_temp/nvcc/* 2>/dev/null | tail -n1 | cut -f1))"
echo
fi

# Print current dist status to verify we're connected
sccache 2>/dev/null --dist-status \
| {
# Passthrough if the format is json
if test "$f" = json; then
cat - <(echo)
else

cat - | jq -r -f <(cat <<EOF
def truncate_val: (
. as \$x
| \$x | length as \$l
Expand All @@ -47,7 +74,7 @@ _sccache_dist_status() {
end
);
def info_to_row: {
time: now | floor,
time: now | strflocaltime("%X"),
type: (.type // "server"),
id: .id,
servers: (if .servers == null then "-" else (.servers | length) end),
Expand All @@ -57,36 +84,47 @@ _sccache_dist_status() {
loading: .jobs.loading,
pending: .jobs.pending,
running: .jobs.running,
max: ((.max_job_age // 0) | tostring | . + "s"),
accepted: .jobs.accepted,
finished: .jobs.finished,
u_time: ((.u_time // 0) | tostring | . + "s")
seen: ((.u_time // 0) | tostring | . + "s"),
};

.SchedulerStatus as [\$x, \$y] | [
(\$y + { id: \$x, type: "scheduler", u_time: (\$y.servers // {} | map(.u_time) | min | . // "-" | tostring) }),
(\$y + { id: \$x, type: "scheduler", u_time: (\$y.servers // {} | map(.u_time) | min | . // "-" | tostring), max_job_age: (\$y.servers // {} | map(.u_time + .max_job_age) | max | . // "-" | tostring) }),
(\$y.servers // [] | sort_by(.id)[])
]
| map(info_to_row) as \$rows
| (\$rows[0] | keys_unsorted) as \$cols
| (\$rows | map(. as \$row | \$cols | map(\$row[.] | truncate_val))) as \$rows
| (\$cols | map(truncate_val)), \$rows[] | @csv
EOF
)
fi
} \
| {
# Passthrough if the format is csv or json
# Otherwise, transform the csv into a tsv.
if test "$f" = tsv; then
if [[ "$(grep DISTRIB_RELEASE= /etc/lsb-release | cut -d= -f2)" > "20.04" ]]; then
cat - | sed 's/\"//g' | column -t -s, -R $(seq -s, 1 13)
)
fi
} \
| {
# Passthrough if the format is csv or json
# Otherwise, transform the csv into a tsv.
if test "$f" = tsv; then
if [[ "$(grep DISTRIB_RELEASE= /etc/lsb-release | cut -d= -f2)" > "20.04" ]]; then
cat - | sed 's/\"//g' | column -t -s, -R $(seq -s, 1 14)
else
cat - | sed 's/\"//g' | column -t -s,
fi
else
cat -
fi
}

if ! test -n "${no_stats:+x}"; then
echo
if test "$f" = json; then
sccache --show-stats --stats-format json
else
cat - | sed 's/\"//g' | column -t -s,
sccache --show-stats
fi
else
cat -
fi
}
fi
}

_sccache_dist_status "$@" <&0;