Spaces:
Sleeping
Sleeping
File size: 692 Bytes
84d6673 4178722 84d6673 f699f62 36da45d f699f62 6a9cff2 84d6673 6a9cff2 84d6673 6a9cff2 84d6673 6a9cff2 84d6673 6a9cff2 84d6673 6a9cff2 |
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 |
FROM python:3.12-slim
# 2. Set working directory
WORKDIR /app
# 3. Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
poppler-utils \
tesseract-ocr \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /home/user/huggingface && chmod -R 777 /home/user
ENV HF_HOME=/home/user/huggingface
ENV TRANSFORMERS_CACHE=/home/user/huggingface/transformers
# 5. Copy requirements
COPY requirements.txt .
# 6. Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# 7. Copy the app code
COPY . .
# 8. Expose Gradio default port
EXPOSE 7860
# 9. Run the Gradio app
CMD ["python", "app.py"]
|