Spaces:
Sleeping
Sleeping
Download Dockerfile from userIdc2024/ProductShowcaseStudio: direct link, hf CLI and curl.
- Browser
- Download file 909 Bytes
-
https://huggingface.co/spaces/userIdc2024/ProductShowcaseStudio/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/userIdc2024/ProductShowcaseStudio/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/userIdc2024/ProductShowcaseStudio/resolve/main/Dockerfile
909 Bytes
| # syntax=docker/dockerfile:1 | |
| # Hugging Face Spaces (Docker) — FastAPI + Vite build. Listens on $PORT (default 7860). | |
| FROM node:22-bookworm-slim AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json frontend/package-lock.json ./ | |
| RUN npm ci | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| FROM python:3.12-slim-bookworm | |
| # git: HF Docker builder may inject `git config` after this file; slim images omit git by default. | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY backend/requirements.txt /app/backend/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/backend/requirements.txt | |
| COPY backend/ /app/backend/ | |
| COPY --from=frontend-build /app/frontend/dist /app/frontend/dist | |
| ENV PYTHONPATH=/app/backend | |
| ENV PORT=7860 | |
| WORKDIR /app/backend | |
| CMD ["sh", "-c", "exec uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"] | |