Spaces:
Sleeping
Sleeping
File size: 580 Bytes
feb1fc5 cb997a6 e25e9af feb1fc5 48e8df6 cb997a6 e25e9af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Existing Flask app and ASGI adapter.
COPY app.py gateway.py ./
COPY models ./models
EXPOSE 7860
# Single public HTTP service: Uvicorn serves the Flask app through its ASGI adapter.
CMD ["uvicorn", "gateway:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--timeout-keep-alive", "120"] |