Skip to content

Commit

Permalink
update make-*-dependences scripts to work with no projects (#335)
Browse files Browse the repository at this point in the history
* update make-*-dependences scripts to work when no cpp or python project is available

* version bump

* bump feature version

---------

Co-authored-by: Paul Taylor <[email protected]>
Co-authored-by: ptaylor <[email protected]>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 9246f91 commit fb079d6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA RAPIDS devcontainer build utilities",
"id": "rapids-build-utils",
"version": "24.8.10",
"version": "24.8.11",
"description": "A feature to install the RAPIDS devcontainer build utilities",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,31 @@ make_conda_dependencies() {

if [ -f ~/"${!repo_path}/dependencies.yaml" ]; then

echo "Generating ${!repo_name}'s repo conda env yml" 1>&2;

local repo_keys=("${key[@]}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
local file="/tmp/${!repo_name}.${repo_keys[$keyi]}.env.yaml";
conda_env_yamls+=("${file}");
generate_env_yaml \
"${file}" \
--file-key "${repo_keys[$keyi]}" \
--output conda \
--config ~/"${!repo_path}/dependencies.yaml" \
--matrix "arch=$(uname -m);cuda=${cuda_version};py=${python_version}" \
;
done

local cpp_length="${repo}_cpp_length";

for ((j=0; j < ${!cpp_length:-0}; j+=1)); do
local cpp_name="${repo}_cpp_${j}_name";

echo "Generating lib${!cpp_name}'s conda env yml" 1>&2;

local repo_keys=("${key[@]}" "${key[@]/%/_lib${!cpp_name//"-"/"_"}}");
local repo_keys=("${key[@]/%/_lib${!cpp_name//"-"/"_"}}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
Expand All @@ -100,7 +117,7 @@ make_conda_dependencies() {

echo "Generating ${!py_name}'s conda env yml" 1>&2;

local repo_keys=("${key[@]}" "${key[@]/%/_${!py_name//"-"/"_"}}");
local repo_keys=("${key[@]/%/_${!py_name//"-"/"_"}}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,31 @@ make_pip_dependencies() {

if [ -f ~/"${!repo_path}/dependencies.yaml" ]; then

echo "Generating ${!repo_name}'s repo requirements.txt" 1>&2;

local repo_keys=("${key[@]}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
local file="/tmp/${!repo_name}.${repo_keys[$keyi]}.requirements.txt";
pip_reqs_txts+=("${file}");
generate_requirements \
"${file}" \
--file-key "${repo_keys[$keyi]}" \
--output requirements \
--config ~/"${!repo_path}/dependencies.yaml" \
--matrix "arch=$(uname -m);cuda=${cuda_version};py=${python_version}" \
;
done

local cpp_length="${repo}_cpp_length";

for ((j=0; j < ${!cpp_length:-0}; j+=1)); do
local cpp_name="${repo}_cpp_${j}_name";

echo "Generating lib${!cpp_name}'s requirements.txt" 1>&2;

local repo_keys=("${key[@]}" "${key[@]/%/_lib${!cpp_name//"-"/"_"}}");
local repo_keys=("${key[@]/%/_lib${!cpp_name//"-"/"_"}}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
Expand All @@ -104,7 +121,7 @@ make_pip_dependencies() {

echo "Generating ${!py_name}'s requirements.txt" 1>&2;

local repo_keys=("${key[@]}" "${key[@]/%/_${!py_name//"-"/"_"}}");
local repo_keys=("${key[@]/%/_${!py_name//"-"/"_"}}");
local keyi;

for ((keyi=0; keyi < ${#repo_keys[@]}; keyi+=1)); do
Expand Down

0 comments on commit fb079d6

Please sign in to comment.