speech-analysis / Dockerfile
jaykishan-b's picture
Updated: Timeout
f6ea2b1
raw
history blame contribute delete
719 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install spaCy model
RUN python -m spacy download en_core_web_sm
# Copy the current directory contents into the container
COPY . .
# Expose the port FastAPI will run on
EXPOSE 7860
# Command to run the application with Gunicorn and Uvicorn workers
# CMD ["uvicorn", "app.main:server", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
CMD ["uvicorn", "app.main:server", "--host", "0.0.0.0", "--port", "7860", "--workers", "4", "--timeout-keep-alive", "60", "--timeout-graceful-shutdown", "60"]