Spaces:
Runtime error
Runtime error
File size: 509 Bytes
63cc1e3 2c9f53d 63cc1e3 2c9f53d 63cc1e3 c9278b5 63cc1e3 2c9f53d 63cc1e3 c9278b5 63cc1e3 a05a622 | 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 | FROM python:3.9-slim
# Install Tesseract and Git
RUN apt-get update && apt-get install -y \
tesseract-ocr \
libtesseract-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user
RUN useradd -m appuser
WORKDIR /app
COPY . /app
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Change ownership of the /app directory to appuser
RUN chown -R appuser:appuser /app
# Switch to the non-root user
USER appuser
EXPOSE 7861
CMD ["python", "main.py"] |