# Use the official Python 3.10.9 image FROM python:3.10.9 # Set the working directory WORKDIR /app # Copy the current directory contents into the container COPY . . # Install requirements RUN pip install --no-cache-dir --upgrade -r requirements.txt # Ensure the correct permissions for hrequests library path RUN chmod -R a+w /usr/local/lib/python3.10/site-packages/hrequests/bin/ # Start the FastAPI app on port 7860, the default port expected by Spaces CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]