File tree 3 files changed +25
-13
lines changed
3 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,10 @@ Bootstrap: scratch
38
38
mkdir -p ${SINGULARITY_ROOTFS}/var/lib/sss
39
39
mkdir -p ${SINGULARITY_ROOTFS}/var/run/munge
40
40
41
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-22.07
42
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-22.10
43
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-23.01
44
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-23.04
45
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-23.07
46
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-23.10
47
- mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-24.01
41
+ mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-24.12
42
+ mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/analysis3-25.01
43
+ mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/access-med-0.12
44
+ mkdir -p ${SINGULARITY_ROOTFS}/opt/conda/esmvaltool-0.5
48
45
49
46
%runscript
50
47
/usr/bin/bash -l
Original file line number Diff line number Diff line change @@ -80,18 +80,31 @@ function write_modulerc() {
80
80
module_path=" ${4} "
81
81
module_name=" ${5} "
82
82
83
- cat<< EOF > "${module_path} "/.modulerc
83
+ modulerc_file=" ${module_path} /.modulerc"
84
+
85
+ # Create a new .modulerc file if it doesn't exist
86
+ if [ ! -f " ${modulerc_file} " ]; then
87
+ touch " ${modulerc_file} "
88
+ fi
89
+
90
+ # Remove lines containing the specified module_name
91
+ temp_file=$( mktemp)
92
+ grep -v " module-version ${module_name} /" " ${modulerc_file} " > " ${temp_file} "
93
+ mv " ${temp_file} " " ${modulerc_file} "
94
+
95
+ # Append the new module_version lines
96
+ cat << EOF >> "${modulerc_file} "
84
97
#%Module1.0
85
98
86
- module-version ${module_name} /${stable} access-med ${env_name} default
99
+ module-version ${module_name} /${stable} access-med ${env_name}
87
100
module-version ${module_name} /${unstable} ${env_name} -unstable
88
101
89
102
EOF
90
103
91
- set_apps_perms " ${module_path} /.modulerc"
92
-
104
+ set_apps_perms " ${modulerc_file} "
93
105
}
94
106
107
+
95
108
function symlink_atomic_update() {
96
109
link_name=" ${1} "
97
110
link_target=" ${2} "
Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ function inner() {
17
17
18
18
mkdir -p " ${CONDA_INSTALLATION_PATH} "
19
19
pushd " ${CONDA_INSTALLATION_PATH} "
20
- # curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
20
+ # ## Romain Dec 2024, revert to latest micromamba
21
+ curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
21
22
# ## Modified micromamba for compatibility with nb_conda_kernels
22
- curl -Ls https://dsroberts.github.io/mamba/latest | tar -xvj bin/micromamba bin/activate
23
+ # curl -Ls https://dsroberts.github.io/mamba/latest | tar -xvj bin/micromamba bin/activate
24
+
23
25
popd
24
26
25
27
mkdir -p " ${CONDA_SCRIPT_PATH} " /overrides
You can’t perform that action at this time.
0 commit comments