Spaces:
Sleeping
Sleeping
Download Dockerfile from Creatiste/taste-engine: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/Creatiste/taste-engine/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Creatiste/taste-engine/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Creatiste/taste-engine/resolve/main/Dockerfile
1.16 kB
| # --- Stage 1: Build frontend --- | |
| FROM oven/bun:1 AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json frontend/bun.lock* ./ | |
| RUN bun install --frozen-lockfile | |
| COPY frontend/ . | |
| RUN bun run build | |
| # --- Stage 2: Python runtime --- | |
| FROM python:3.11-slim | |
| # System deps for torch/PIL | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python deps with pip (uv not available in slim image) | |
| COPY pyproject.toml . | |
| RUN pip install --no-cache-dir ".[browser]" 2>/dev/null || pip install --no-cache-dir . && \ | |
| pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu | |
| # Copy app code | |
| COPY taste/ taste/ | |
| COPY backend/ backend/ | |
| COPY cli.py . | |
| # Copy built frontend | |
| COPY --from=frontend-build /app/frontend/dist frontend/dist | |
| # Data directory — mounted from HF bucket at /data | |
| ENV TASTE_DATA_DIR=/data | |
| ENV HF_HOME=/data/cache/huggingface | |
| ENV TRANSFORMERS_CACHE=/data/cache/huggingface | |
| # HF Spaces expects port 7860 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |