Spaces:
Running
Running
# Base image with Python 3.11 and CUDA (for GPU support; remove/change if CPU-only) | |
FROM python:3.11-slim | |
# Set environment variables | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
PYTHONUNBUFFERED=1 \ | |
PIP_NO_CACHE_DIR=1 | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
libgl1-mesa-glx \ | |
build-essential \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install git-lfs and initialize (if needed by olmocr) | |
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ | |
apt-get install -y git-lfs && git lfs install | |
# Set working directory | |
WORKDIR /app | |
# Copy requirement files | |
COPY requirements.txt . | |
# Install Python dependencies | |
RUN pip install --upgrade pip && pip install -r requirements.txt | |
# Copy application code | |
COPY . . | |
# Run Gradio app | |
CMD ["python", "app.py"] | |