Spaces:
Paused
Paused
Download Dockerfile from immahadi/FreeLLMAPI: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/immahadi/FreeLLMAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/immahadi/FreeLLMAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/immahadi/FreeLLMAPI/resolve/main/Dockerfile
1.19 kB
| # Use the official pre-built OmniRoute image — avoids ~12 GiB Next.js webpack OOM on HF Spaces | |
| FROM diegosouzapw/omniroute:3.8.53 | |
| USER root | |
| # Install sqlite3 for WAL checkpoint in sync scripts | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| sqlite3 python3 python3-pip ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && pip3 install --no-cache-dir --break-system-packages "huggingface_hub>=0.23.0" | |
| # Create persistent mount point and hand to non-root user (UID 1000) | |
| RUN mkdir -p /data && chown -R node:node /data && chmod -R 775 /data | |
| # HF Spaces: port 7860, data dir /data, bind all interfaces | |
| ENV PORT=7860 \ | |
| DASHBOARD_PORT=7860 \ | |
| API_PORT=7860 \ | |
| HOSTNAME=0.0.0.0 \ | |
| APP_BIND_HOST=0.0.0.0 \ | |
| DATA_DIR=/data \ | |
| NODE_ENV=production \ | |
| OMNIROUTE_MEMORY_MB=1024 \ | |
| NODE_OPTIONS="--max-old-space-size=1024" \ | |
| HF_DATASET_REPO=userbymahadi/OmniRoute-storage | |
| USER node | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ | |
| CMD node -e "fetch('http://127.0.0.1:'+process.env.PORT+'/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))" | |
| CMD ["node", "dev/run-standalone.mjs"] | |