-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/dev' into migrate-map-tests
- Loading branch information
Showing
17 changed files
with
468 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"shutdownAction": "stopContainer", | ||
"image": "rapidsai/devcontainers:23.12-cpp-gcc12-cuda12.3-ubuntu22.04", | ||
"hostRequirements": { | ||
"gpu": true | ||
}, | ||
"initializeCommand": [ | ||
"/bin/bash", | ||
"-c", | ||
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}" | ||
], | ||
"containerEnv": { | ||
"SCCACHE_REGION": "us-east-2", | ||
"SCCACHE_BUCKET": "rapids-sccache-devs", | ||
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai", | ||
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history", | ||
"DEVCONTAINER_NAME": "cuda12.3-gcc12", | ||
"CUCO_CUDA_VERSION": "12.3", | ||
"CUCO_HOST_COMPILER": "gcc", | ||
"CUCO_HOST_COMPILER_VERSION": "12" | ||
}, | ||
"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" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"llvm-vs-code-extensions.vscode-clangd" | ||
], | ||
"settings": { | ||
"clangd.arguments": [ | ||
"--compile-commands-dir=${workspaceFolder}/build/latest" | ||
] | ||
} | ||
} | ||
}, | ||
"name": "cuda12.3-gcc12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,42 @@ | ||
{ | ||
"shutdownAction": "stopContainer", | ||
"image": "rapidsai/devcontainers:23.08-cpp-gcc12-cuda12.2-ubuntu22.04", | ||
"hostRequirements": { | ||
"gpu": true | ||
}, | ||
"initializeCommand": [ | ||
"/bin/bash", | ||
"-c", | ||
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}" | ||
], | ||
"containerEnv": { | ||
"SCCACHE_REGION": "us-east-2", | ||
"SCCACHE_BUCKET": "rapids-sccache-devs", | ||
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai", | ||
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history" | ||
}, | ||
"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" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"llvm-vs-code-extensions.vscode-clangd" | ||
], | ||
"settings": { | ||
"clangd.arguments": [ | ||
"--compile-commands-dir=${workspaceFolder}/build/latest" | ||
] | ||
} | ||
} | ||
"shutdownAction": "stopContainer", | ||
"image": "rapidsai/devcontainers:23.12-cpp-gcc12-cuda12.3-ubuntu22.04", | ||
"hostRequirements": { | ||
"gpu": true | ||
}, | ||
"initializeCommand": [ | ||
"/bin/bash", | ||
"-c", | ||
"mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}" | ||
], | ||
"containerEnv": { | ||
"SCCACHE_REGION": "us-east-2", | ||
"SCCACHE_BUCKET": "rapids-sccache-devs", | ||
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai", | ||
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history", | ||
"DEVCONTAINER_NAME": "cuda12.3-gcc12", | ||
"CUCO_CUDA_VERSION": "12.3", | ||
"CUCO_HOST_COMPILER": "gcc", | ||
"CUCO_HOST_COMPILER_VERSION": "12" | ||
}, | ||
"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" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"llvm-vs-code-extensions.vscode-clangd" | ||
], | ||
"settings": { | ||
"clangd.arguments": [ | ||
"--compile-commands-dir=${workspaceFolder}/build/latest" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"name": "cuda12.3-gcc12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/bin/bash | ||
|
||
function usage { | ||
echo "Usage: $0" | ||
echo | ||
echo "This script is intended to be run within one of CUCO's Dev Containers." | ||
echo "It verifies that the expected environment variables and binary versions match what is expected." | ||
} | ||
|
||
check_envvars() { | ||
for var_name in "$@"; do | ||
if [[ -z "${!var_name:-}" ]]; then | ||
echo "::error:: ${var_name} variable is not set." | ||
exit 1 | ||
else | ||
echo "$var_name=${!var_name}" | ||
fi | ||
done | ||
} | ||
|
||
check_host_compiler_version() { | ||
local version_output=$($CXX --version) | ||
|
||
if [[ "$CXX" == "g++" ]]; then | ||
local actual_version=$(echo "$version_output" | head -n 1 | cut -d ' ' -f 4 | cut -d '.' -f 1) | ||
local expected_compiler="gcc" | ||
elif [[ "$CXX" == "clang++" ]]; then | ||
if [[ $version_output =~ clang\ version\ ([0-9]+) ]]; then | ||
actual_version=${BASH_REMATCH[1]} | ||
else | ||
echo "::error:: Unable to determine clang version." | ||
exit 1 | ||
fi | ||
expected_compiler="llvm" | ||
else | ||
echo "::error:: Unexpected CXX value ($CXX)." | ||
exit 1 | ||
fi | ||
|
||
if [[ "$expected_compiler" != "${CUCO_HOST_COMPILER}" || "$actual_version" != "$CUCO_HOST_COMPILER_VERSION" ]]; then | ||
echo "::error:: CXX ($CXX) version ($actual_version) does not match the expected compiler (${CUCO_HOST_COMPILER}) and version (${CUCO_HOST_COMPILER_VERSION})." | ||
exit 1 | ||
else | ||
echo "Detected host compiler: $CXX version $actual_version" | ||
fi | ||
} | ||
|
||
check_cuda_version() { | ||
local cuda_version_output=$(nvcc --version) | ||
if [[ $cuda_version_output =~ release\ ([0-9]+\.[0-9]+) ]]; then | ||
local actual_cuda_version=${BASH_REMATCH[1]} | ||
else | ||
echo "::error:: Unable to determine CUDA version from nvcc." | ||
exit 1 | ||
fi | ||
|
||
if [[ "$actual_cuda_version" != "$CUCO_CUDA_VERSION" ]]; then | ||
echo "::error:: CUDA version ($actual_cuda_version) does not match the expected CUDA version ($CUCO_CUDA_VERSION)." | ||
exit 1 | ||
else | ||
echo "Detected CUDA version: $actual_cuda_version" | ||
fi | ||
} | ||
|
||
main() { | ||
if [[ "$1" == "-h" || "$1" == "--help" ]]; then | ||
usage | ||
exit 0 | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
check_envvars DEVCONTAINER_NAME CXX CUCO_HOST_COMPILER CUCO_CUDA_VERSION CUCO_HOST_COMPILER_VERSION | ||
|
||
check_host_compiler_version | ||
|
||
check_cuda_version | ||
|
||
echo "Dev Container successfully verified!" | ||
} | ||
|
||
main "$@" |
Oops, something went wrong.