Skip to content

Commit

Permalink
Always create an extended version of the default devcontainer.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Oct 30, 2024
1 parent 8b511a9 commit 7abd2c5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .devcontainer/cuda12.6ext-gcc13/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"shutdownAction": "stopContainer",
"image": "rapidsai/devcontainers:24.12-cpp-gcc13-cuda12.6ext",
"hostRequirements": {
"gpu": "optional"
},
"initializeCommand": [
"/bin/bash",
"-c",
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}; mkdir -m 0755 -p ${localWorkspaceFolder}/build;",
"if [[ -n ${WSLENV+set} ]]; then docker volume create cccl-build; else docker volume create --driver local --opt type=none --opt device=${localWorkspaceFolder}/build --opt o=bind cccl-build fi;"
],
"containerEnv": {
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history",
"DEVCONTAINER_NAME": "cuda12.6-gcc13",
"CCCL_CUDA_VERSION": "12.6",
"CCCL_HOST_COMPILER": "gcc",
"CCCL_HOST_COMPILER_VERSION": "13",
"CCCL_BUILD_INFIX": "cuda12.6-gcc13",
"CCCL_CUDA_EXTENDED": "true"
},
"workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent",
"mounts": [
"source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=cccl-build,target=/home/coder/cccl/build"
],
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"nvidia.nsight-vscode-edition",
"ms-vscode.cmake-tools"
],
"settings": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"clang-format.executable": "/usr/bin/clang-format",
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}"
],
"files.eol": "\n",
"files.trimTrailingWhitespace": true
}
}
},
"name": "cuda12.6-gcc13"
}
8 changes: 7 additions & 1 deletion .devcontainer/make_devcontainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,14 @@ readonly DEFAULT_NAME=$(make_name "$DEFAULT_CUDA" "$DEFAULT_CUDA_EXT" "$DEFAULT_
update_devcontainer ${base_devcontainer_file} "./temp_devcontainer.json" "$DEFAULT_NAME" "$DEFAULT_CUDA" "$DEFAULT_CUDA_EXT" "$DEFAULT_COMPILER_NAME" "$DEFAULT_COMPILER_EXE" "$DEFAULT_COMPILER_VERSION" "$DEVCONTAINER_VERSION"
mv "./temp_devcontainer.json" ${base_devcontainer_file}

# Always create an extended version of the default devcontainer:
readonly EXT_NAME=$(make_name "$DEFAULT_CUDA" true "$DEFAULT_COMPILER_NAME" "$DEFAULT_COMPILER_VERSION")
update_devcontainer ${base_devcontainer_file} "./temp_devcontainer.json" "$DEFAULT_NAME" "$DEFAULT_CUDA" true "$DEFAULT_COMPILER_NAME" "$DEFAULT_COMPILER_EXE" "$DEFAULT_COMPILER_VERSION" "$DEVCONTAINER_VERSION"
mkdir -p "$EXT_NAME"
mv "./temp_devcontainer.json" "$EXT_NAME/devcontainer.json"

# Create an array to keep track of valid subdirectory names
valid_subdirs=()
valid_subdirs=("$EXT_NAME")

# The img folder should not be removed:
valid_subdirs+=("img")
Expand Down

0 comments on commit 7abd2c5

Please sign in to comment.