From 1ae2c0c5070f9383852ad0416bbdaee7ab3b6bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 6 Dec 2024 13:24:14 +0100 Subject: [PATCH 1/3] use REPOSITORY_* variables for repo id, version, name, and use them throughout the entire script --- bot/build.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bot/build.sh b/bot/build.sh index 81b3ef4660..b674acfd44 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -125,7 +125,9 @@ else fi # determine repository to be used from entry .repository in ${JOB_CFG_FILE} -REPOSITORY=$(cfg_get_value "repository" "repo_id") +REPOSITORY_ID=$(cfg_get_value "repository" "repo_id") +REPOSITORY_NAME=$(cfg_get_value "repository" "repo_name") +REPOSITORY_VERSION=$(cfg_get_value "repository" "repo_version") EESSI_REPOS_CFG_DIR_OVERRIDE=$(cfg_get_value "repository" "repos_cfg_dir") export EESSI_REPOS_CFG_DIR_OVERRIDE=${EESSI_REPOS_CFG_DIR_OVERRIDE:-${PWD}/cfg} echo "bot/build.sh: EESSI_REPOS_CFG_DIR_OVERRIDE='${EESSI_REPOS_CFG_DIR_OVERRIDE}'" @@ -134,13 +136,13 @@ echo "bot/build.sh: EESSI_REPOS_CFG_DIR_OVERRIDE='${EESSI_REPOS_CFG_DIR_OVERRIDE # here, just set & export EESSI_VERSION_OVERRIDE # next script (eessi_container.sh) makes use of it via sourcing init scripts # (e.g., init/eessi_defaults or init/minimal_eessi_env) -export EESSI_VERSION_OVERRIDE=$(cfg_get_value "repository" "repo_version") +export EESSI_VERSION_OVERRIDE=${REPOSITORY_VERSION} echo "bot/build.sh: EESSI_VERSION_OVERRIDE='${EESSI_VERSION_OVERRIDE}'" # determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE} # here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down # "source init/eessi_defaults" via sourcing init/minimal_eessi_env -export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/$(cfg_get_value "repository" "repo_name") +export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/${REPOSITORY_NAME} echo "bot/build.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'" # determine CPU architecture to be used from entry .architecture in ${JOB_CFG_FILE} @@ -169,11 +171,11 @@ COMMON_ARGS+=("--mode" "run") [[ ! -z ${CONTAINER} ]] && COMMON_ARGS+=("--container" "${CONTAINER}") [[ ! -z ${HTTP_PROXY} ]] && COMMON_ARGS+=("--http-proxy" "${HTTP_PROXY}") [[ ! -z ${HTTPS_PROXY} ]] && COMMON_ARGS+=("--https-proxy" "${HTTPS_PROXY}") -[[ ! -z ${REPOSITORY} ]] && COMMON_ARGS+=("--repository" "${REPOSITORY}") +[[ ! -z ${REPOSITORY_ID} ]] && COMMON_ARGS+=("--repository" "${REPOSITORY_ID}") # Also expose software.eessi.io when configured for dev.eessi.io # Need software.eessi.io for the compat layer -if [[ "${REPOSITORY}" == dev.eessi.io ]]; then +if [[ "${REPOSITORY_NAME}" == "dev.eessi.io" ]]; then COMMON_ARGS+=("--repository" "software.eessi.io,access=ro") fi From e0b98ad4cef008b7563a429375ceb100731517b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 6 Dec 2024 13:26:20 +0100 Subject: [PATCH 2/3] don't install CUDA on RISC-V build hosts --- bot/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot/build.sh b/bot/build.sh index b674acfd44..01f971dde0 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -193,6 +193,12 @@ fi [[ ! -z ${BUILD_LOGS_DIR} ]] && INSTALL_SCRIPT_ARGS+=("--build-logs-dir" "${BUILD_LOGS_DIR}") [[ ! -z ${SHARED_FS_PATH} ]] && INSTALL_SCRIPT_ARGS+=("--shared-fs-path" "${SHARED_FS_PATH}") +# Skip CUDA installation for riscv.eessi.io +if [[ "${REPOSITORY_NAME}" == "riscv.eessi.io" ]]; then + echo "bot/build.sh: disabling CUDA installation for RISC-V repository (${REPOSITORY_NAME})" + INSTALL_SCRIPT_ARGS+=("--skip-cuda-install") +fi + # determine if the removal step has to be run # assume there's only one diff file that corresponds to the PR patch file pr_diff=$(ls [0-9]*.diff | head -1) From 2938e3cf3f21a10cb4051dbc6c12aa8c439aa876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 6 Dec 2024 13:35:00 +0100 Subject: [PATCH 3/3] use $JOB_STORAGE as base dir for $SINGULARITY_TMPDIR --- bot/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/build.sh b/bot/build.sh index 01f971dde0..29444a32c2 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -110,7 +110,7 @@ echo "bot/build.sh: LOAD_MODULES='${LOAD_MODULES}'" # singularity/apptainer settings: CONTAINER, HOME, TMPDIR, BIND CONTAINER=$(cfg_get_value "repository" "container") export SINGULARITY_HOME="${PWD}:/eessi_bot_job" -export SINGULARITY_TMPDIR="${PWD}/singularity_tmpdir" +export SINGULARITY_TMPDIR="${JOB_STORAGE}/singularity_tmpdir" mkdir -p ${SINGULARITY_TMPDIR} # load modules if LOAD_MODULES is not empty