Spaces:
Building
Building
File size: 489 Bytes
b849899 598e1e1 b8f61f5 598e1e1 b8f61f5 b849899 b8f61f5 b849899 598e1e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FROM python:3.9
# Install OpenGL dependencies and Xvfb
RUN apt-get update && \
apt-get install -y libgl1-mesa-glx libgl1-mesa-dev xvfb
# Set the working directory in the container
WORKDIR /app
# Copy the app.py script to the working directory
COPY app.py .
# Install the required Python dependencies
RUN pip install pyglet arcade pygame
# Set the display environment variable
ENV DISPLAY=:99
# Run Xvfb and the app.py script when the container starts
CMD Xvfb :99 & python app.py |