File size: 522 Bytes
233f6d4 | 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 | FROM --platform=linux/amd64 python:3.7-slim
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
redis-server \
libxrender1 \
libxext6 \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application code
COPY . .
# HF Spaces requires port 7860
EXPOSE 7860
# Startup: Redis + worker + Flask
CMD ["bash", "start.sh"]
|