Spaces:
Running
Running
Download Dockerfile from server2/s4: direct link, hf CLI and curl.
- Browser
- Download file 670 Bytes
-
https://huggingface.co/spaces/server2/s4/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/server2/s4/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/server2/s4/resolve/main/Dockerfile
670 Bytes
| FROM node:22-bookworm-slim | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| ENV NODE_ENV=production | |
| COPY --chown=node:node package.json package-lock.json ./ | |
| RUN npm ci --omit=dev --no-audit --no-fund | |
| COPY --chown=node:node server.js ./ | |
| USER node | |
| ENV HOME=/home/node | |
| ENV PORT=7860 | |
| ENV UV_THREADPOOL_SIZE=4 | |
| ENV NODE_OPTIONS=--max-old-space-size=4096 | |
| EXPOSE 7860 | |
| STOPSIGNAL SIGTERM | |
| HEALTHCHECK --interval=45s --timeout=5s --start-period=50s --retries=3 CMD node -e "fetch('http://127.0.0.1:7860/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" | |
| CMD ["node","server.js"] | |