Skip to content

Commit

Permalink
add empirical model to ngiab (#253)
Browse files Browse the repository at this point in the history
* add empirical model to ngiab

* add comment to dockerfile

* add tab-completion to HelloNGEN config file selection
  • Loading branch information
JoshCu authored Dec 17, 2024
1 parent e0c1504 commit 72f1877
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM rockylinux:9.1 AS base
ENV TROUTE_REPO=CIROH-UA/t-route
ENV TROUTE_BRANCH=datastream
ENV NGEN_REPO=CIROH-UA/ngen
ENV NGEN_BRANCH=main
ENV NGEN_BRANCH=ngiab

# Install system dependencies
RUN echo "max_parallel_downloads=10" >> /etc/dnf/dnf.conf
Expand Down Expand Up @@ -194,6 +194,10 @@ RUN uv pip install numpy==$(/dmod/bin/ngen --info | grep -e 'NumPy Version: ' |
# we can add the venv to the path so ngen can find it
ENV PATH="/ngen/.venv/bin:${PATH}"

# Install lstm - the extra index url installs cpu-only pytorch which is ~6gb smaller
COPY --from=ngen_clone /ngen/ngen/extern/lstm/lstm /ngen/ngen/extern/lstm
RUN uv pip install --no-cache-dir /ngen/ngen/extern/lstm --extra-index-url https://download.pytorch.org/whl/cpu

## add some metadata to the image
COPY --from=troute_build /tmp/troute_url /ngen/troute_url
COPY --from=ngen_build /tmp/ngen_url /ngen/ngen_url
Expand Down
6 changes: 3 additions & 3 deletions docker/HelloNGEN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,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"

Expand Down

0 comments on commit 72f1877

Please sign in to comment.