wearon / Dockerfile
Bhushan26's picture
Update Dockerfile
4b9746e verified
raw
history blame
627 Bytes
# Use the official Python image as a base
FROM python:3.9 AS base
# Set the working directory
WORKDIR /code
# Copy the requirements file into the container
COPY requirements.txt /code/requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application code into the container
COPY . .
# Stage for running the Flask application with Gunicorn
FROM base AS app
# Command to run the application using Gunicorn with a timeout of 10 minutes
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "600", "main:app"]