Spaces:
Paused
Paused
Update Dockerfile
Browse files112344567789101011121313141516161718191920# Use the official Python base image# Use the official Python 3.9 slim imageFROM python:3.9-slim
# Set the working directory inside the container# Set the working directory in the containerWORKDIR /app
# Copy the requirements file to the working directory# Copy the requirements.txt file into the containerCOPY requirements.txt .
# Install dependencies# Install the dependencies specified in requirements.txtRUN pip install --no-cache-dir -r requirements.txt
# Copy the application content to the working directory# Copy the entire application code into the containerCOPY . .
# Expose the port on which the application will run (FastAPI default is 8000)# Expose the port that FastAPI will useEXPOSE 8000
# Start the application using Gunicorn# Start the FastAPI app with Gunicorn for better performanceCMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--log-level", "debug", "--access-logfile", "-"]Dockerfile+7-7