Spaces:
Runtime error
Runtime error
| # Use Python 3.9 base image | |
| FROM python:3.9 | |
| # Set the working directory | |
| WORKDIR /code | |
| # Copy requirements file and install dependencies | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy the rest of the project files | |
| COPY ./models /code/models | |
| COPY ./checkpoints /code/checkpoints | |
| COPY ./results /code/results | |
| COPY ./temp /code/temp | |
| COPY ./third_part /code/third_part | |
| COPY ./utils /code/utils | |
| # Copy additional Python files | |
| COPY ./inference.py /code/inference.py | |
| COPY ./predict.py /code/predict.py | |
| COPY ./app.py /code/app.py | |
| # Expose port for FastAPI server | |
| EXPOSE 7860 | |
| # Define the command to run the FastAPI application with uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |