update
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
cat <<'EOF'
|
||||
Usage:
|
||||
scripts/rainml_py.sh <script_or_module> [args...]
|
||||
|
||||
Examples:
|
||||
scripts/rainml_py.sh scripts/train_rain_model.py --site home --horizon-hours 4 ...
|
||||
scripts/rainml_py.sh scripts/predict_rain_model.py --site home --model-name rain_next_4h --horizon-hours 4
|
||||
|
||||
Optional:
|
||||
RAINML_PY_BUILD=1 scripts/rainml_py.sh ...
|
||||
(builds the rainml image before running)
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${RAINML_PY_BUILD:-0}" == "1" ]]; then
|
||||
docker compose build rainml
|
||||
fi
|
||||
|
||||
docker compose run --rm --no-deps --entrypoint python3 rainml "$@"
|
||||
Reference in New Issue
Block a user