FROM python:3.10-slim # System dependencies RUN apt-get update && apt-get install -y \ wget \ curl \ git \ build-essential \ && rm -rf /var/lib/apt/lists/* # (Optional) Chrome install RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \ && apt-get update && apt-get install -y google-chrome-stable \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements first (better Docker caching) COPY requirements.txt . RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY . . # Expose HF default port EXPOSE 7860 # Start app CMD ["python", "app.py"]