Spaces:
Running
Running
| # Use the official Python image as the base image | |
| FROM python:3.10-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt . | |
| # Install dependencies from requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all other files into the container | |
| COPY . . | |
| # Expose the port where the app will run | |
| EXPOSE 8000 | |
| # Set environment variables if necessary | |
| ENV PATH="/app:${PATH}" | |
| # Command to run FastAPI app with Uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |