File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
examples/machine-learning/build-service-images Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ deployment_groups:
3030 enabled : true
3131 world_writable : true
3232 runners :
33+ - $(vars.runner_write_gcluster_build_info)
3334 - $(vars.runner_install_cluster_health_scanner)
3435 - type : data
3536 destination : /etc/apt/preferences.d/block-broken-nvidia-container
Original file line number Diff line number Diff line change @@ -29,6 +29,25 @@ if [[ ! -d "$RECIPE" ]]; then
2929 exit 1
3030fi
3131
32+ GCLUSTER_VERSION=" $( gcluster --version 2>&1 || echo ' gcluster not found' ) "
33+ readonly GCLUSTER_VERSION
34+ GIT_STATUS=" $( git status --porcelain 2>&1 || echo ' not a git repository' ) "
35+ readonly GIT_STATUS
36+
37+ INFO_STRING=$(
38+ cat << EOF
39+ gcluster version:
40+ $GCLUSTER_VERSION
41+
42+ Git Status:
43+ $GIT_STATUS
44+ EOF
45+ )
46+
47+ GCLUSTER_BUILD_INFO=$( echo -n " $INFO_STRING " )
48+ readonly GCLUSTER_BUILD_INFO
49+ echo " $GCLUSTER_BUILD_INFO " > ./gcluster-build-info
50+
3251readonly FAMILY=" $RECIPE -$SUFFIX "
3352LONG_DEPLOYMENT_NAME=" $USER -$FAMILY "
3453readonly DEPLOYMENT_NAME=" ${LONG_DEPLOYMENT_NAME: 0: 31} "
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ deployment_groups:
3030 enabled : true
3131 world_writable : true
3232 runners :
33+ - $(vars.runner_write_gcluster_build_info)
3334 - $(vars.runner_install_cluster_health_scanner)
3435 - type : data # see https://github.com/GoogleCloudPlatform/cluster-toolkit/pull/4152
3536 destination : /etc/apt/preferences.d/block-broken-nvidia-container
Original file line number Diff line number Diff line change 3333 APT::Periodic::Update-Package-Lists "0";
3434 APT::Periodic::Unattended-Upgrade "0";
3535
36+ runner_write_gcluster_build_info :
37+ type : data
38+ destination : /etc/gcluster-build-info
39+ source : $(ghpc_stage("../gcluster-build-info"))
40+
3641 runner_install_slurm :
3742 type : shell
3843 destination : install_slurm.sh
You can’t perform that action at this time.
0 commit comments