ml_models / Dockerfile
ajayduraisamy's picture
rw
cb997a6
Raw History Blame Contribute Delete
580 Bytes
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"]