@@ -30,6 +30,7 @@ update_devcontainer() {
3030 local compiler_exe=" $7 "
3131 local compiler_version=" $8 "
3232 local devcontainer_version=" $9 "
33+ local internal=" ${10} "
3334
3435 local cuda_suffix=" "
3536 if $cuda_ext ; then
@@ -41,8 +42,16 @@ update_devcontainer() {
4142 if [ $compiler_name == " nvhpc" ]; then
4243 toolkit_name=" "
4344 fi
45+
4446 local IMAGE_ROOT=" rapidsai/devcontainers:${devcontainer_version} -cpp-"
45- local image=" ${IMAGE_ROOT}${compiler_name}${compiler_version}${toolkit_name} "
47+ local INTERNAL_ROOT=" gitlab-master.nvidia.com:5005/cccl/cccl-devcontainers:cpp-"
48+
49+ img=$IMAGE_ROOT
50+ if [ " $internal " == " true" ]; then
51+ img=$INTERNAL_ROOT
52+ fi ;
53+
54+ local image=" ${img}${compiler_name}${compiler_version}${toolkit_name} "
4655
4756 jq --arg image " $image " \
4857 --arg name " $name " \
@@ -123,22 +132,24 @@ readonly combinations=$(echo "$matrix_json" | jq -c '.combinations[]')
123132# other devcontainer.json files by replacing the `image:` field with the appropriate image name
124133readonly base_devcontainer_file=" ./devcontainer.json"
125134readonly NEWEST_GCC_CUDA_ENTRY=$( echo " $combinations " | jq -rs ' [.[] | select(.compiler_name == "gcc")] | sort_by((.cuda | tonumber), (.compiler_version | tonumber)) | .[-1]' )
135+ readonly NEWEST_LLVM_CUDA_ENTRY=$( echo " $combinations " | jq -rs ' [.[] | select(.compiler_name == "llvm")] | sort_by((.cuda | tonumber), (.compiler_version | tonumber)) | .[-1]' )
126136readonly DEFAULT_CUDA=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -r ' .cuda' )
127137readonly DEFAULT_CUDA_EXT=false
128138readonly DEFAULT_COMPILER_NAME=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -r ' .compiler_name' )
129139readonly DEFAULT_COMPILER_EXE=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -r ' .compiler_exe' )
130140readonly DEFAULT_COMPILER_VERSION=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -r ' .compiler_version' )
131141readonly DEFAULT_NAME=$( make_name " $DEFAULT_CUDA " " $DEFAULT_CUDA_EXT " " $DEFAULT_COMPILER_NAME " " $DEFAULT_COMPILER_VERSION " )
132142
133- 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 "
143+ 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 " " false "
134144mv " ./temp_devcontainer.json" ${base_devcontainer_file}
135145
136146# Always create an extended version of the default devcontainer:
137147readonly EXT_NAME=$( make_name " $DEFAULT_CUDA " true " $DEFAULT_COMPILER_NAME " " $DEFAULT_COMPILER_VERSION " )
138- update_devcontainer ${base_devcontainer_file} " ./temp_devcontainer.json" " $EXT_NAME " " $DEFAULT_CUDA " true " $DEFAULT_COMPILER_NAME " " $DEFAULT_COMPILER_EXE " " $DEFAULT_COMPILER_VERSION " " $DEVCONTAINER_VERSION "
148+ update_devcontainer ${base_devcontainer_file} " ./temp_devcontainer.json" " $EXT_NAME " " $DEFAULT_CUDA " true " $DEFAULT_COMPILER_NAME " " $DEFAULT_COMPILER_EXE " " $DEFAULT_COMPILER_VERSION " " $DEVCONTAINER_VERSION " " false "
139149mkdir -p " $EXT_NAME "
140150mv " ./temp_devcontainer.json" " $EXT_NAME /devcontainer.json"
141151
152+
142153# Create an array to keep track of valid subdirectory names
143154valid_subdirs=(" $EXT_NAME " )
144155
@@ -150,19 +161,27 @@ for rapids_container in *rapids*; do
150161 valid_subdirs+=(" ${rapids_container} " )
151162done
152163
164+ # Inject ctk version 99.9
165+ readonly cuda99_9_gcc=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -rsc ' .[].cuda |= "99.9" | .[].internal |= true | .[-1]' )
166+ readonly cuda99_8_gcc=$( echo " $NEWEST_GCC_CUDA_ENTRY " | jq -rsc ' .[].cuda |= "99.8" | .[].internal |= true | .[-1]' )
167+ readonly cuda99_9_llvm=$( echo " $NEWEST_LLVM_CUDA_ENTRY " | jq -rsc ' .[].cuda |= "99.9" | .[].internal |= true | .[-1]' )
168+ readonly cuda99_8_llvm=$( echo " $NEWEST_LLVM_CUDA_ENTRY " | jq -rsc ' .[].cuda |= "99.8" | .[].internal |= true | .[-1]' )
169+
170+ readonly all_comb=" $combinations $cuda99_9_gcc $cuda99_8_gcc $cuda99_9_llvm $cuda99_8_llvm "
153171# For each unique combination
154- for combination in $combinations ; do
172+ for combination in $all_comb ; do
155173 cuda_version=$( echo " $combination " | jq -r ' .cuda' )
156174 cuda_ext=$( echo " $combination " | jq -r ' .cuda_ext' )
157175 compiler_name=$( echo " $combination " | jq -r ' .compiler_name' )
158176 compiler_exe=$( echo " $combination " | jq -r ' .compiler_exe' )
159177 compiler_version=$( echo " $combination " | jq -r ' .compiler_version' )
178+ internal=$( echo " $combination " | jq -r ' .internal' )
160179
161180 name=$( make_name " $cuda_version " " $cuda_ext " " $compiler_name " " $compiler_version " )
162181 mkdir -p " $name "
163182 new_devcontainer_file=" $name /devcontainer.json"
164183
165- update_devcontainer " $base_devcontainer_file " " $new_devcontainer_file " " $name " " $cuda_version " " $cuda_ext " " $compiler_name " " $compiler_exe " " $compiler_version " " $DEVCONTAINER_VERSION "
184+ update_devcontainer " $base_devcontainer_file " " $new_devcontainer_file " " $name " " $cuda_version " " $cuda_ext " " $compiler_name " " $compiler_exe " " $compiler_version " " $DEVCONTAINER_VERSION " " $internal "
166185 echo " Created $new_devcontainer_file "
167186
168187 # Add the subdirectory name to the valid_subdirs array
0 commit comments