Download tasks/insurify/environment/reference/clone/compile.sh from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/insurify/environment/reference/clone/compile.sh
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/insurify/environment/reference/clone/compile.sh
-
curl -L -o compile.sh https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/insurify/environment/reference/clone/compile.sh
1.2 kB
| set -Eeuo pipefail | |
| if (( $# != 0 )); then | |
| echo "compile.sh takes no arguments" >&2 | |
| exit 2 | |
| fi | |
| candidate_root="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)" | |
| cd "$candidate_root" | |
| cat > executable <<'EXECUTABLE' | |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| : "${HOST:?HOST is required}" | |
| : "${PORT:?PORT is required}" | |
| : "${DATA_DIR:?DATA_DIR is required}" | |
| : "${SEED:?SEED is required}" | |
| : "${TZ:?TZ is required}" | |
| case "$PORT" in | |
| *[!0-9]*|'') echo "PORT must be numeric" >&2; exit 2 ;; | |
| esac | |
| case "$SEED" in | |
| *[!0-9]*|'') echo "SEED must be a non-negative integer" >&2; exit 2 ;; | |
| esac | |
| app_root="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)" | |
| mkdir -p -- "$DATA_DIR" | |
| export HOST PORT DATA_DIR SEED TZ | |
| export PYTHONDONTWRITEBYTECODE=1 | |
| export PYTHONHASHSEED="$SEED" | |
| export PYTHONPATH="$app_root${PYTHONPATH:+:$PYTHONPATH}" | |
| export WEBSITEBENCH_DATA_DIR="$DATA_DIR" | |
| export WEBSITEBENCH_SEED="$SEED" | |
| export WEBSITEBENCH_SITE_BACKEND_RUNTIME="$app_root/backend/runtime.json" | |
| export WEBSITEBENCH_SITE_BACKEND_DATABASE="$DATA_DIR/insurify.sqlite3" | |
| exec "${PYTHON:-python3}" -m uvicorn app:app --app-dir "$app_root" --host "$HOST" --port "$PORT" | |
| EXECUTABLE | |
| chmod 755 executable | |