Spaces:
Runtime error
Runtime error
File size: 665 Bytes
5d3f08d bdf5172 be72fed 5d3f08d be72fed 5d3f08d 12c43c0 18a5bf3 72409e1 5d3f08d 18a5bf3 e270f2d 18a5bf3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Use the official Python 3.10.9 image
FROM python:3.10.9
# Install wkhtmltopdf and its dependencies
RUN apt-get update && apt-get install -y \
wkhtmltopdf \
&& rm -rf /var/lib/apt/lists/*
# 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"] |