Spaces:
Sleeping
Sleeping
File size: 739 Bytes
75c3f27 23b54a0 54248dd 53cd9f6 23b54a0 7e7b6d8 23b54a0 7e7b6d8 23b54a0 7e7b6d8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | FROM python:3.12-slim
# Install system dependencies needed for Pillow, fontconfig, and ffmpeg
RUN apt-get update && apt-get install -y \
ffmpeg \
libgl1 \
libglib2.0-0 \
libgomp1 \
fontconfig \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY reddit_template.png .
# Copy fonts directory (must exist in repo — add .gitkeep if no fonts yet)
COPY fonts/ ./fonts/
# Hugging Face Spaces requires port 7860
EXPOSE 7860
# Run with uvicorn on the required HF port
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |