Kartikeyssj2's picture
Update Dockerfile
52a5778 verified
raw
history blame contribute delete
472 Bytes
FROM python:3.12.3-slim
WORKDIR /app
# Install git and other dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
RUN python download_models.py
COPY . .
# Use 4 worker processes to handle requests efficiently.
CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "fast_api:app"]