Skip to content

Commit 9c48991

Browse files
committed
prueba de implementación
1 parent 5ce985d commit 9c48991

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/run_all_requests_scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- name: Make launcher executable
1616
run: chmod +x scripts/launch_all_requests_scripts.sh
1717
- name: Run launcher with SLURM
18+
shell: bash -l {0}
1819
run: |
19-
module load miniconda3
2020
bash scripts/launch_all_requests_scripts.sh

scripts/launch_all_requests_scripts.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,26 @@
1111
# Get all unique script paths from all requests/*.csv files
1212
SCRIPTS=$(awk -F',' 'NR>1 && $0!~/^$/ {for(i=1;i<=NF;i++) if($i ~ /scripts\// || $i ~ /derived\// || $i ~ /interpolation\//) print $i}' requests/*.csv | sort | uniq)
1313

14-
source ~/.bashrc
15-
mamba activate c3s-atlas
14+
source ~/.bashrc || true
15+
16+
# Try to activate the env robustly across HPCs
17+
if command -v mamba >/dev/null 2>&1; then
18+
mamba activate c3s-atlas || true
19+
elif command -v conda >/dev/null 2>&1; then
20+
# Ensure conda is initialized in non-interactive shells
21+
eval "$(conda shell.bash hook)" || true
22+
conda activate c3s-atlas || true
23+
elif command -v micromamba >/dev/null 2>&1; then
24+
eval "$(micromamba shell hook -s bash)" || true
25+
micromamba activate c3s-atlas || true
26+
fi
27+
28+
# Verify activation worked
29+
python -c "import sys; assert sys.prefix and 'c3s-atlas' in sys.prefix" 2>/dev/null || {
30+
echo "Failed to activate conda/mamba env 'c3s-atlas'. Ensure it exists or install with:"
31+
echo " conda env create -f environment.yml"
32+
exit 1
33+
}
1634

1735
for script in $SCRIPTS; do
1836
if [[ -f "$script" ]]; then

0 commit comments

Comments
 (0)