Download scripts/check-permissions.sh from rais133/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/rais133/omniroute/resolve/main/scripts/check-permissions.sh
- Command line
-
hf download hf://spaces/rais133/omniroute/scripts/check-permissions.sh
-
curl -L -o check-permissions.sh https://huggingface.co/spaces/rais133/omniroute/resolve/main/scripts/check-permissions.sh
1.12 kB
| set -e | |
| # ββ Memory limit override ββββββββββββββββββββββββββββββββββββββββββββββ | |
| # If OMNIROUTE_MEMORY_MB is set, build NODE_OPTIONS dynamically so the | |
| # user can tune heap size via environment without editing the Dockerfile. | |
| if [ -n "$OMNIROUTE_MEMORY_MB" ]; then | |
| export NODE_OPTIONS="${NODE_OPTIONS:-} --max-old-space-size=${OMNIROUTE_MEMORY_MB}" | |
| fi | |
| DATA_PATH="${DATA_DIR:-/app/data}" | |
| if [ -d "$DATA_PATH" ] && [ ! -w "$DATA_PATH" ]; then | |
| echo "WARNING: $DATA_PATH is not writable by the current user (UID $(id -u))." | |
| if [ "${CONTAINER_HOST:-}" = "podman" ]; then | |
| echo "Rootless Podman maps container UIDs into a subordinate range." | |
| echo "Run this on the host to fix (using the host-side bind-mount path):" | |
| echo " podman unshare chown -R $(id -u):$(id -g) <host-data-dir>" | |
| else | |
| echo "Run this on the Docker host to fix (using the host-side bind-mount path):" | |
| echo " sudo chown -R $(id -u):$(id -g) <host-data-dir>" | |
| echo " chmod -R u+rwX <host-data-dir>" | |
| fi | |
| fi | |
| exec "$@" | |