SmartManuals-AI / Dockerfile
damoojeje's picture
Update Dockerfile
be51358 verified
raw
history blame
819 Bytes
# Use slim Python base image
FROM python:3.10-slim
# Install system-level dependencies
RUN apt-get update && apt-get install -y \
tesseract-ocr \
libglib2.0-0 \
libgl1 \
libsm6 \
libxext6 \
libxrender-dev \
poppler-utils \
ffmpeg \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV HF_HUB_DISABLE_SYMLINKS_WARNING=1
# Set working directory
WORKDIR /home/user/app
# Copy dependencies and install
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy app source files
COPY . .
# Download NLTK data (punkt tokenizer)
RUN python -m nltk.downloader punkt
# Expose Gradio's default port
EXPOSE 7860
# Launch the Gradio app
CMD ["python", "app.py"]