Spaces:
Paused
Paused
| FROM node:20-slim | |
| # Zelin Cluster Worker — RigoChat-7B-v2 inference node | |
| # System deps | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3 make g++ git curl wget ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # CPU Performance | |
| ENV NODE_OPTIONS="--max-old-space-size=6144" | |
| ENV UV_THREADPOOL_SIZE=16 | |
| WORKDIR /app | |
| # Copy package files first | |
| COPY package.json package-lock.json* ./ | |
| # Install dependencies | |
| RUN npm install --production 2>&1 | tail -5 || \ | |
| npm install --legacy-peer-deps 2>&1 | tail -5 || true | |
| # Copy application code | |
| COPY . . | |
| # Setup | |
| RUN mkdir -p /app/models /tmp/zelin-cache | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| ENV MODEL_DIR=/app/models | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=180s --retries=5 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| CMD ["node", "worker.js"] | |