Spaces:
Build error
Build error
FROM python:3.13-slim | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
libgomp1 \ | |
libgl1 \ | |
libglib2.0-0 \ | |
libsm6 \ | |
libxext6 \ | |
libxrender1 \ | |
libfontconfig1 \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 | |
# Set up a non-root user | |
RUN useradd -m -u 1000 user | |
USER user | |
# Set environment variables | |
ENV HOME=/home/user | |
ENV PADDLE_HOME=/home/user/.paddleocr | |
ENV PATH="/home/user/.local/bin:$PATH" | |
WORKDIR $HOME/app | |
# Copy application files | |
COPY --chown=user:user . $HOME/app | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Expose the application port | |
EXPOSE 7860 | |
# Command to run the application | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |