Download Dockerfile from Ikyy/pair: direct link, hf CLI and curl.
- Browser
- Download file 827 Bytes
-
https://huggingface.co/spaces/Ikyy/pair/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ikyy/pair/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ikyy/pair/resolve/main/Dockerfile
827 Bytes
| # Dockerfile | |
| FROM node:20-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| git \ | |
| make \ | |
| g++ \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy root package files and install | |
| COPY package*.json ./ | |
| RUN npm install | |
| # Copy server file | |
| COPY server.js ./ | |
| # Copy frontend folder | |
| COPY frontend ./frontend | |
| # Build frontend | |
| WORKDIR /app/frontend | |
| RUN npm install && npm run build | |
| # Back to root | |
| WORKDIR /app | |
| # Expose port 7860 (required by Hugging Face) | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ | |
| CMD node -e "require('http').get('http://localhost:7860/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" | |
| RUN chmod -R 777 /app | |
| # Start the application | |
| CMD ["npm", "start"] |