Update Dockerfile
Browse files112345456710 unmodified lines18192022212223242526262728293031313233343435363738394041# 1. Start with the Python Base Image# 1. Base ImageFROM python:3.10-slim
# 2. Install System Dependencies# Note: We use \ to break lines. Do not put comments # inside the command.# 2. Install System Dependencies (Fixes for Debian Trixie)RUN apt-get update && apt-get install -y \ wget \ gnupg \10 unmodified lines chromium-driver \ && rm -rf /var/lib/apt/lists/*
# 3. Set environment variables# 3. Environment Setup# We force the display to 99 so the bot can "see" without a monitorENV DISPLAY=:99ENV PYTHONUNBUFFERED=1
# 4. Setup WorkspaceWORKDIR /app
# 4. Install Python RequirementsCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
# 5. Copy your code# 5. Copy App CodeCOPY . .
# 6. Start Virtual Screen and your App# 6. EXPOSE the Port# This tells Hugging Face that port 7860 is where the website livesEXPOSE 7860
# 7. The Launch Command# We start the Virtual Screen (Xvfb) first, then run the Python appCMD ["sh", "-c", "Xvfb :99 -screen 0 1280x720x24 & python app.py"]Dockerfile+13-7