Skip to content

Commit

Permalink
Fix directories perms for new self hosted runners
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Jacobelli <[email protected]>
  • Loading branch information
jjacobelli committed Oct 23, 2023
1 parent f25c7fb commit deabafb
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/cuda11.8-conda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"overrideFeatureInstallOrder": [
"./features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda11.8-envs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0775 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda11.8-envs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cuda11.8-pip/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"./features/cuda",
"./features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0775 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cuda12.0-conda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"overrideFeatureInstallOrder": [
"./features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.0-envs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0775 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.0-envs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cuda12.0-pip/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"./features/cuda",
"./features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0775 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent",
Expand Down
2 changes: 1 addition & 1 deletion features/src/llvm/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"updateContentCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
"mkdir -m 0775 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
],
"customizations": {
"vscode": {
Expand Down
8 changes: 4 additions & 4 deletions features/src/utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ for dir in $(for_each_user_bashrc 'echo "$(dirname "$(realpath -m "$0")")"'); do
rm -f "${dir}"/.gitconfig;
cp .gitconfig "${dir}"/.gitconfig.default;
# Create ~/.cache, i.e. $XDG_CACHE_HOME
mkdir -p -m 0755 "${dir}"/.cache;
mkdir -p -m 0775 "${dir}"/.cache;
# Create ~/.cache, i.e. $XDG_CONFIG_HOME
mkdir -p -m 0755 "${dir}"/.config/{clangd,pip};
mkdir -p -m 0775 "${dir}"/.config/{clangd,pip};
# Create ~/.local/state, i.e. $XDG_STATE_HOME
mkdir -p -m 0755 "${dir}"/.local/state;
mkdir -p -m 0775 "${dir}"/.local/state;
# Create or update ~/.ssh/known_hosts
mkdir -p -m 0700 "${dir}"/.ssh;
touch "${dir}"/.ssh/known_hosts;
Expand All @@ -140,7 +140,7 @@ usermod -aG crontab "${USERNAME}";
echo "${USERNAME}" >> /etc/cron.allow;

# Create ~/.cache, i.e. $XDG_CONFIG_HOME
mkdir -p -m 0755 "${USERHOME}"/.local/bin;
mkdir -p -m 0775 "${USERHOME}"/.local/bin;

# Ensure the user owns their homedir
chown -R "${USERNAME}:${USERNAME}" "${USERHOME}";
Expand Down
2 changes: 1 addition & 1 deletion image/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"updateContentCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
"mkdir -m 0775 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
],
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ run_devcontainer() {
--image-name "docker.io/rapidsai/devcontainers:${tag}" \
;

mkdir -p -m 0755 .scratch/.{aws,cache,config};
mkdir -p -m 0775 .scratch/.{aws,cache,config};

local term="${TERM:-}";
local lines="$(tput lines)";
Expand Down

0 comments on commit deabafb

Please sign in to comment.