Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567891011121314151617181920# Use a lightweight Python imageFROM python:3.9-slim# Set working directoryWORKDIR /app# Copy dependenciesCOPY requirements.txt .# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt# Copy application filesCOPY . .# Expose the port the FastAPI app will run onEXPOSE 8000# Start the FastAPI app with UvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]1234567891011121314151617181920# Use the official Python base imageFROM python:3.9-slim# Set the working directory inside the containerWORKDIR /app# Copy the requirements file to the working directoryCOPY requirements.txt .# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt# Copy the application content to the working directoryCOPY . .# Expose the port on which the application will run (FastAPI default is 8000)EXPOSE 8000# Start the application using GunicornCMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--log-level", "debug", "--access-logfile", "-"]
Dockerfile+7-7