Spaces:
Build error
Build error
File size: 744 Bytes
1dda151 d547fe9 f546aae 2ac6d1d f546aae 3fcae4d d547fe9 3fcae4d d547fe9 3fcae4d 8e5b1fc f546aae 4464a5b 3fcae4d d547fe9 3fcae4d |
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 30 31 32 33 34 35 36 37 38 |
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"]
|