Spaces:
Running
Running
| # Use the official Python image | |
| FROM python:3.9 | |
| # Set the working directory | |
| WORKDIR /code | |
| # Copy requirements first (for better caching) | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy the rest of the application | |
| COPY . . | |
| # Create a writable directory for the cache/local storage if needed | |
| RUN mkdir -p /code/cache && chmod 777 /code/cache | |
| # Start the application on port 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |