Skip to content

Commit

Permalink
chown -R faster (#321)
Browse files Browse the repository at this point in the history
* use find and xargs to mimic a faster parallel chown -R, ignore permissions errors

* update kvikio path

* fix typo
  • Loading branch information
trxcllnt authored Jun 11, 2024
1 parent ffe52f4 commit c005f81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "24.8.3",
"version": "24.8.4",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
depends: [rmm]
python:
- name: kvikio
sub_dir: python
sub_dir: python/kvikio
depends: [KvikIO]
args: {cmake: -DFIND_KVIKIO_CPP=ON}

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": "24.8.2",
"version": "24.8.3",
"description": "A feature to install RAPIDS devcontainer utility scripts",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
7 changes: 4 additions & 3 deletions features/src/utils/opt/devcontainer/bin/post-start-command.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#! /usr/bin/env bash

if test -z "${SKIP_DEVCONTAINER_UTILS_POST_START_COMMAND:-}"; then
find ~/ -maxdepth 1 -exec bash -c '\
[ $(stat -c "%u:%g" "$0") != "$1" ] && \
sudo chown -R "$1" "$0"' {} "$(id -u):$(id -g)" \;
# Fast parallel `chown -R`
find ~/ -not -user coder -print0 2>/dev/null \
| sudo xargs -0 -r -n1 -P"$(nproc --all)" chown "$(id -u):$(id -g)" 2>/dev/null \
|| true;

# shellcheck disable=SC1091
. devcontainer-utils-init-git;
Expand Down

0 comments on commit c005f81

Please sign in to comment.