Skip to content

Commit

Permalink
Update workflows to support new self-hosted runners (#164)
Browse files Browse the repository at this point in the history
* Fix self-hosted runners prefix

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>

* Use buildkitd config file to use docker mirror

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>

* Fix directories perms for new self hosted runners

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>

---------

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>
  • Loading branch information
jjacobelli authored Oct 24, 2023
1 parent e62f2d5 commit 1ab9117
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 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 .github/actions/devcontainer-json/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
steps:

- name: Setup Node.js
if: contains(runner.name, 'rapidsai') == true
if: contains(runner.name, 'linux-') == true
uses: actions/setup-node@v3
with:
node-version: '16'
Expand Down
11 changes: 6 additions & 5 deletions .github/actions/setup-runner-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ runs:
using: composite
steps:

- if: contains(runner.name, 'rapidsai') != true
- if: contains(runner.name, 'linux-') != true
name: Free up disk space
uses: ./.github/actions/free-disk-space
with:
tool_cache: "${{ runner.tool_cache }}"

- if: contains(runner.name, 'rapidsai') == true
- if: contains(runner.name, 'linux-') == true
name: Setup self-hosted runner environment
shell: bash -eo pipefail {0}
run: |
echo "HOME=${{ runner.workspace }}" >> $GITHUB_ENV;
echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV;
- if: contains(runner.name, 'rapidsai') == true
- if: contains(runner.name, 'linux-') == true
name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- if: contains(runner.name, 'rapidsai') != true
- if: contains(runner.name, 'linux-') != true
name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand All @@ -36,5 +36,6 @@ runs:
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
buildkitd-flags: --debug --config /etc/buildkit/buildkitd.toml
endpoint: builder
config: /etc/buildkit/buildkitd.toml
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 1ab9117

Please sign in to comment.