Update Dockerfile
Browse files12345678910111213143 unmodified lines181920212223242526272829# Use a Python base with high compatibilityFROM python:3.10-slim# Install system dependencies for Chromium, Xvfb, and OpenGL (for game rendering)RUN apt-get update && apt-get install -y \wget gnupg unzip xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 \libnss3 libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 \chromium chromium-driver \&& rm -rf /var/lib/apt/lists/*# Create a non-root user for Hugging Face SpacesRUN useradd -m -u 1000 userUSER userENV HOME=/home/user \3 unmodified linesWORKDIR $HOME/app# Install Python requirementsCOPY --chown=user requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Copy the rest of the applicationCOPY --chown=user . .# Launch: Start Xvfb (Virtual Screen) then the Python AppCMD ["sh", "-c", "Xvfb :99 -ac -screen 0 1280x720x24 & python app.py"]12345678910113 unmodified lines151617181920212223FROM python:3.10-slimRUN apt-get update && apt-get install -y \wget gnupg unzip xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 \libnss3 libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 \chromium chromium-driver \&& rm -rf /var/lib/apt/lists/*RUN useradd -m -u 1000 userUSER userENV HOME=/home/user \3 unmodified linesWORKDIR $HOME/appCOPY --chown=user requirements.txt .RUN pip install --no-cache-dir -r requirements.txtCOPY --chown=user . .CMD ["sh", "-c", "Xvfb :99 -ac -screen 0 1280x720x24 & python app.py"]
Dockerfile-6