Spaces:
Sleeping
Sleeping
Download Dockerfile from tryprogram/offer-puplayer: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/tryprogram/offer-puplayer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tryprogram/offer-puplayer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tryprogram/offer-puplayer/resolve/main/Dockerfile
794 Bytes
| # Stage 1: Build frontend | |
| FROM node:20 AS frontend-build | |
| WORKDIR /app | |
| COPY frontend/package.json frontend/package-lock.json* ./ | |
| RUN npm install | |
| COPY frontend/ . | |
| RUN npm run build | |
| # Stage 2: Backend | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies for pdfplumber | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy and install Python dependencies | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy backend code | |
| COPY backend/ . | |
| # Copy pre-downloaded ONNX model | |
| COPY models/ ./models/ | |
| # Copy frontend build | |
| COPY --from=frontend-build /app/dist ./static | |
| # HF Space port | |
| EXPOSE 7860 | |
| # Start server | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |