From a70149c1ef7deb0a693f1ed478af6a4e259b6305 Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:13:09 -0800 Subject: [PATCH 1/7] add empirical model to ngiab --- singularity/templates/guide/HelloNGEN.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/singularity/templates/guide/HelloNGEN.sh b/singularity/templates/guide/HelloNGEN.sh index bb478f9..3673d36 100644 --- a/singularity/templates/guide/HelloNGEN.sh +++ b/singularity/templates/guide/HelloNGEN.sh @@ -89,9 +89,9 @@ select option in "${options[@]}"; do case $option in "Run NextGen model framework in serial mode"|"Run NextGen model framework in parallel mode") echo -e "\n" - n1=${selected_catchment:-$(read -p "Enter the hydrofabric catchment file path: " n1; echo "$n1")} - n2=${selected_nexus:-$(read -p "Enter the hydrofabric nexus file path: " n2; echo "$n2")} - n3=${selected_realization:-$(read -p "Enter the Realization file path: " n3; echo "$n3")} + n1=${selected_catchment:-$(read -erp "Enter the hydrofabric catchment file path: " n1; echo "$n1")} + n2=${selected_nexus:-$(read -erp "Enter the hydrofabric nexus file path: " n2; echo "$n2")} + n3=${selected_realization:-$(read -erp "Enter the Realization file path: " n3; echo "$n3")} echo -e "${GREEN}Selected files:\nCatchment: $n1\nNexus: $n2\nRealization: $n3${RESET}\n" From 678bbf8300c31aa4b5bc66982c45fc1fbe1b0c91 Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:18:41 -0800 Subject: [PATCH 2/7] add empirical model to ngiab --- singularity/singularity_ngen.def | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index f14792d..d3f9b6a 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -5,7 +5,7 @@ From: rockylinux:9.1 export TROUTE_REPO="CIROH-UA/t-route" export TROUTE_BRANCH="datastream" export NGEN_REPO="CIROH-UA/ngen" - export NGEN_BRANCH="main" + export NGEN_BRANCH="ngiab" export PATH="/usr/lib64/mpich/bin:$PATH" export PATH="/root/.cargo/bin:$PATH" export PATH="/ngen/.venv/bin:$PATH" @@ -140,6 +140,9 @@ From: rockylinux:9.1 uv pip install --no-cache-dir netCDF4==1.6.3 uv pip install numpy==$(/dmod/bin/ngen --info | grep -e 'NumPy Version: ' | cut -d ':' -f 2 | uniq | xargs) + # Install lstm + uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu + # Make everything in /ngen accessible chmod -R 755 /ngen From 8b90cb361c979d24e6c9dfa4fda1eb65b3c1821c Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:53:05 -0800 Subject: [PATCH 3/7] copy lstm before install --- singularity/singularity_ngen.def | 1 + 1 file changed, 1 insertion(+) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index d3f9b6a..ce5d279 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -141,6 +141,7 @@ From: rockylinux:9.1 uv pip install numpy==$(/dmod/bin/ngen --info | grep -e 'NumPy Version: ' | cut -d ':' -f 2 | uniq | xargs) # Install lstm + cp /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu # Make everything in /ngen accessible From 933bfd884c821865ab206dc9db6e31480b51683a Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:33:24 -0800 Subject: [PATCH 4/7] add debug --- singularity/singularity_ngen.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index ce5d279..1b2d000 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -141,6 +141,8 @@ From: rockylinux:9.1 uv pip install numpy==$(/dmod/bin/ngen --info | grep -e 'NumPy Version: ' | cut -d ':' -f 2 | uniq | xargs) # Install lstm + ls -l /ngen/ngen/extern + ls -l /ngen/ngen/extern/lstm cp /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu From b3136e71fd1302d6911344283aee312ccab02155 Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:28:24 -0800 Subject: [PATCH 5/7] ngen branch to ngiab --- singularity/singularity_ngen.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index 1b2d000..34850f5 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -15,7 +15,7 @@ From: rockylinux:9.1 TROUTE_REPO="CIROH-UA/t-route" TROUTE_BRANCH="datastream" NGEN_REPO="CIROH-UA/ngen" - NGEN_BRANCH="main" + NGEN_BRANCH="ngiab" # Install system dependencies echo "max_parallel_downloads=10" >> /etc/dnf/dnf.conf From 94db557328d8cdfa0e8b1216b781acfefc5ab571 Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:46:35 -0800 Subject: [PATCH 6/7] copy with recursive --- singularity/singularity_ngen.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index 34850f5..313a1a2 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -143,7 +143,7 @@ From: rockylinux:9.1 # Install lstm ls -l /ngen/ngen/extern ls -l /ngen/ngen/extern/lstm - cp /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm + cp -r /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu # Make everything in /ngen accessible From 2548f0034e27f9e7a77a8a80b69c4241d6152ecb Mon Sep 17 00:00:00 2001 From: Benjamin Lee <130000039+benlee0423@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:08:23 -0800 Subject: [PATCH 7/7] fix copy --- singularity/singularity_ngen.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singularity/singularity_ngen.def b/singularity/singularity_ngen.def index 313a1a2..b5e6bfa 100644 --- a/singularity/singularity_ngen.def +++ b/singularity/singularity_ngen.def @@ -143,7 +143,7 @@ From: rockylinux:9.1 # Install lstm ls -l /ngen/ngen/extern ls -l /ngen/ngen/extern/lstm - cp -r /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm + cp -r /ngen/ngen/extern/lstm/lstm/* /ngen/ngen/extern/lstm/ uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu # Make everything in /ngen accessible