Spaces:
Running
Running
File size: 777 Bytes
1a79cb6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# 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"]
|