Spaces:
Sleeping
Sleeping
File size: 711 Bytes
3298ca9 51277f6 ebbbeb5 3298ca9 51277f6 6ba9cad a4ae348 51277f6 6ba9cad d296660 51277f6 3298ca9 51277f6 3298ca9 51277f6 3298ca9 51277f6 | 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 | FROM python:3.10-slim
# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
# Set cache directories
ENV DOCTR_CACHE_DIR="/code/.cache/doctr"
ENV HF_HOME="/code/.cache/huggingface"
# Create and set permissions for cache directories
RUN mkdir -p /code/.cache/doctr /code/.cache/huggingface && \
chmod 777 -R /code/.cache
# Copy and install requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Expose port
EXPOSE 7860
# Run the Flask+Gradio app
CMD ["python", "app.py"] |