ishaq101's picture
Fix: load Google credentials from env var for HuggingFace Spaces deployment
270c4f4
raw
history blame contribute delete
398 Bytes
FROM python:3.11-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
WORKDIR /app
# Install dependencies (cached layer — only re-runs when pyproject.toml changes)
COPY pyproject.toml .
RUN uv sync --no-dev --no-install-project
# Copy source
COPY . .
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]