Skip to content

Commit

Permalink
Merge pull request #66 from ACCESS-NRI/esmvaltool
Browse files Browse the repository at this point in the history
Add ESMValTool environment
  • Loading branch information
rbeucher authored Feb 20, 2024
2 parents 14d1c0c + ddc04fd commit 52a993e
Show file tree
Hide file tree
Showing 5 changed files with 784 additions and 0 deletions.
8 changes: 8 additions & 0 deletions environments/esmvaltool/build_inner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Custom install inner to build jupyter lab extensions

set +u
eval "$( ${MAMBA} shell hook --shell bash)"
micromamba activate "${CONDA_INSTALLATION_PATH}/envs/${FULLENV}"
set -u

jupyter lab build
23 changes: 23 additions & 0 deletions environments/esmvaltool/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### config.sh MUST provide the following:
### $FULLENV
###
### Arrays used by the build system (optional, can be empty)
### rpms_to_remove
### replace_from_apps
### outside_commands_to_include
### outside_files_to_copy


### Optional config for custom deploy script
export VERSION_TO_MODIFY=0.1
export STABLE_VERSION=0.1
export UNSTABLE_VERSION=0.2

### Version settings
export ENVIRONMENT=esmvaltool
export FULLENV="${ENVIRONMENT}-${VERSION_TO_MODIFY}"

declare -a rpms_to_remove=( "openssh-clients" "openssh-server" "openssh" )
declare -a replace_from_apps=( "openmpi/4.1.5" "ucx/1.14.0" )
declare -a outside_commands_to_include=( "pbs_tmrsh" "ssh" )
declare -a outside_files_to_copy=( "/g/data/hh5/public/apps/nci-intake-catalogue/catalogue_new.yaml" )
18 changes: 18 additions & 0 deletions environments/esmvaltool/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Update stable/unstable if necessary
CURRENT_STABLE=$( get_aliased_module "${MODULE_NAME}"/esmvaltool "${CONDA_MODULE_PATH}" )
NEXT_STABLE="${ENVIRONMENT}-${STABLE_VERSION}"
CURRENT_UNSTABLE=$( get_aliased_module "${MODULE_NAME}"/esmvaltool-unstable "${CONDA_MODULE_PATH}" )
NEXT_UNSTABLE="${ENVIRONMENT}-${UNSTABLE_VERSION}"

if ! [[ "${CURRENT_STABLE}" == "${MODULE_NAME}/${NEXT_STABLE}" ]]; then
echo "Updating stable environment to ${NEXT_STABLE}"
write_modulerc "${NEXT_STABLE}" "${NEXT_UNSTABLE}" "${ENVIRONMENT}" "${CONDA_MODULE_PATH}" "${MODULE_NAME}"
symlink_atomic_update "${CONDA_INSTALLATION_PATH}"/envs/"${ENVIRONMENT}" "${NEXT_STABLE}"
symlink_atomic_update "${CONDA_SCRIPT_PATH}"/"${ENVIRONMENT}".d "${NEXT_STABLE}".d
fi
if ! [[ "${CURRENT_UNSTABLE}" == "${MODULE_NAME}/${NEXT_UNSTABLE}" ]]; then
echo "Updating unstable environment to ${NEXT_UNSTABLE}"
write_modulerc "${NEXT_STABLE}" "${NEXT_UNSTABLE}" "${ENVIRONMENT}" "${CONDA_MODULE_PATH}" "${MODULE_NAME}"
symlink_atomic_update "${CONDA_INSTALLATION_PATH}"/envs/"${ENVIRONMENT}"-unstable "${NEXT_UNSTABLE}"
symlink_atomic_update "${CONDA_SCRIPT_PATH}"/"${ENVIRONMENT}"-unstable.d "${NEXT_UNSTABLE}".d
fi
Loading

0 comments on commit 52a993e

Please sign in to comment.