diff --git a/config/common.txt b/config/common.txt index f601f9f..970e881 100644 --- a/config/common.txt +++ b/config/common.txt @@ -4,9 +4,6 @@ # These are low-level tools needed to build local packages # and parse pip dependencies with pipgrip. # -conda-build -conda-verify -compilers setuptools pip wheel diff --git a/deploy/install_nersc_tag.sh b/deploy/install_nersc_tag.sh index 3284b14..124664a 100755 --- a/deploy/install_nersc_tag.sh +++ b/deploy/install_nersc_tag.sh @@ -39,13 +39,13 @@ fi # always created. # Update the persistent git checkout and find the most recent tag -pushd "${git_dir}" >/dev/null 2>&1 +pushd "${git_dir}" 2>&1 >/dev/null git checkout main git fetch --tags git rebase origin/main git remote prune origin latest=$(git describe --tags $(git rev-list --tags --max-count=1)) -popd >/dev/null 2>&1 +popd 2>&1 >/dev/null # See if we already have this tag installed found=no @@ -74,7 +74,7 @@ today=$(date +%Y%m%d) log_file="${log_dir}/check_tags_${host}_${now}" # Create the log file -echo "Starting at ${now}" > "${log_file}" 2>&1 +echo "Starting at ${now}" 2>&1 > "${log_file}" # Get the module file version that will be installed mod_ver="${today}_${latest}" @@ -83,9 +83,9 @@ send_log=no annoy="${git_dir}/.already_annoyed" remain=$(get_common_free_gb) if (( remain < typical )); then - echo "Only ${remain} GB are available in /global/common/software/sobs" >> "${log_file}" 2>&1 - echo "Installing latest tag requires approximately ${typical} GB" >> "${log_file}" 2>&1 - echo "SKIPPING until disk space is cleared." >> "${log_file}" 2>&1 + echo "Only ${remain} GB are available in /global/common/software/sobs" 2>&1 >> "${log_file}" + echo "Installing latest tag requires approximately ${typical} GB" 2>&1 >> "${log_file}" + echo "SKIPPING until disk space is cleared." 2>&1 >> "${log_file}" if [ ! -e "${annoy}" ]; then send_log=yes touch "${annoy}" @@ -93,16 +93,16 @@ if (( remain < typical )); then else send_log=yes rm -f "${git_dir}/.already_annoyed" - echo "Latest tag '${latest}' not found, installing..." >> "${log_file}" 2>&1 - echo "Note: ${remain} GB are available in /global/common/software/sobs" >> "${log_file}" 2>&1 - echo "Installing latest tag requires approximately ${typical} GB" >> "${log_file}" 2>&1 + echo "Latest tag '${latest}' not found, installing..." 2>&1 >> "${log_file}" + echo "Note: ${remain} GB are available in /global/common/software/sobs" 2>&1 >> "${log_file}" + echo "Installing latest tag requires approximately ${typical} GB" 2>&1 >> "${log_file}" install_log=$(eval "${git_dir}/deploy/install_${host}.sh" "${latest}") if [ -f "${install_log}" ]; then # There were no errors, and the log file was returned - cat "${install_log}" >> "${log_file}" 2>&1 + cat "${install_log}" 2>&1 >> "${log_file}" else # The script must have printed out some errors - echo "${install_log}" >> "${log_file}" 2>&1 + echo "${install_log}" 2>&1 >> "${log_file}" fi fi @@ -114,7 +114,7 @@ if [ -e "${mod_latest}" ]; then rm -f "${mod_dir}/stable.lua" \ && ln -s "${mod_latest}" "${mod_dir}/stable.lua" else - echo "ERROR: module file ${mod_latest} was not created- leaving stable symlink" >> "${log_file}" 2>&1 + echo "ERROR: module file ${mod_latest} was not created- leaving stable symlink" 2>&1 >> "${log_file}" fi echo "Finished installing tag '${latest}' on host ${NERSC_HOST} at $(date +%Y%m%d-%H%M%S)" >> "${log_file}" @@ -124,7 +124,7 @@ if [ "${send_log}" = "yes" ]; then slack_web_hook=${SLACKBOT_SOCONDA} if [ "x${slack_web_hook}" = "x" ]; then - echo "Environment variable SLACKBOT_SOCONDA not set- skipping notifications" >> "${log_file}" 2>&1 + echo "Environment variable SLACKBOT_SOCONDA not set- skipping notifications" 2>&1 >> "${log_file}" else # Create the JSON payload. slackjson="${log_file}_slack.json" @@ -132,6 +132,6 @@ if [ "${send_log}" = "yes" ]; then echo -e "{\"text\":\"soconda install tag (log at \`${log_file}\`):\n\`\`\`$(head -n ${headtail} ${log_file} | sed -e "s|'|\\\'|g")\`\`\`\n(Snip)\n\`\`\`$(tail -n ${headtail} ${log_file} | sed -e "s|'|\\\'|g")\`\`\`\"}" > "${slackjson}" # Post it. slackerror=$(curl -X POST -H 'Content-type: application/json' --data "$(cat ${slackjson})" ${slack_web_hook}) - echo "Slack API post ${slackerror}" >> "${log_file}" 2>&1 + echo "Slack API post ${slackerror}" 2>&1 >> "${log_file}" fi fi diff --git a/deploy/install_perlmutter.sh b/deploy/install_perlmutter.sh index 397430c..206690b 100755 --- a/deploy/install_perlmutter.sh +++ b/deploy/install_perlmutter.sh @@ -49,12 +49,13 @@ if [ -d "${clone_dir}" ]; then rm -rf "${clone_dir}" fi -git clone --depth=1 --single-branch --branch=${version} https://github.com/simonsobs/soconda.git "${clone_dir}" >> "${logfile}" 2>&1 +git clone --depth=1 --single-branch --branch=${version} https://github.com/simonsobs/soconda.git "${clone_dir}" 2>&1 >> "${logfile}" # Activate the base environment and keep it up to date. source "${base_dir}/etc/profile.d/conda.sh" -conda activate base >> "${logfile}" 2>&1 -conda update --yes --all -n base >> "${logfile}" 2>&1 +conda activate base 2>&1 >> "${logfile}" +conda update --yes -n base conda conda-build 2>&1 >> "${logfile}" +conda update --yes --all -n base 2>&1 >> "${logfile}" # Build things from the temp directory @@ -68,14 +69,14 @@ eval "${clone_dir}/soconda.sh" \ -c "perlmutter" \ -e "${env_name}" \ -v "${env_version}" \ - -m "${module_dir}" >> "${logfile}" 2>&1 + -m "${module_dir}" 2>&1 >> "${logfile}" popd 2>&1 >/dev/null popd 2>&1 >/dev/null # Update permissions -chmod -R g-w,g+rX "${env_name}_${env_version}" >> "${logfile}" 2>&1 -chmod -R g-w,g+rX "${module_dir}/soconda" >> "${logfile}" 2>&1 +chmod -R g-w,g+rX "${env_name}_${env_version}" 2>&1 >> "${logfile}" +chmod -R g-w,g+rX "${module_dir}/soconda" 2>&1 >> "${logfile}" # Return name of log file echo "${logfile}" diff --git a/soconda.sh b/soconda.sh index 017642d..8e9a224 100755 --- a/soconda.sh +++ b/soconda.sh @@ -230,11 +230,6 @@ fi # conda command is availabe in both micromamba and miniforge installation. # If you run $(which conda) command it should return $CONDA_PREFIX/bin/conda # in both cases. -mkdir -p "${CONDA_PREFIX}/conda-bld" -conda index "${CONDA_PREFIX}/conda-bld" -conda config \ - --file "${CONDA_PREFIX}/.condarc" \ - --add channels "file://${CONDA_PREFIX}/conda-bld" while IFS='' read -r line || [[ -n "${line}" ]]; do # Is this line commented? @@ -258,7 +253,7 @@ conda build purge rm -rf "${conda_tmp}" &> /dev/null # Remove /tmp/pixell-* test files create by pixell/setup.py -find /tmp -maxdepth 1 -type f -name 'pixell-*' -exec rm {} \; +find "/tmp" -maxdepth 1 -type f -name 'pixell-*' -exec rm {} \; # Install pip packages. We install one package at a time diff --git a/tools/bootstrap_base.sh b/tools/bootstrap_base.sh index b63f011..ff5f5a4 100755 --- a/tools/bootstrap_base.sh +++ b/tools/bootstrap_base.sh @@ -26,7 +26,7 @@ bash "${inst}" -b -f -p "${base}" source "${base}/etc/profile.d/conda.sh" conda activate base conda update -n base --yes conda -conda install -n base --yes conda-libmamba-solver +conda install -n base --yes conda-libmamba-solver conda-build conda deactivate # Create base config file