ViMNer / Dockerfile
Linhz's picture
Update Dockerfile
48d88ef verified
raw
history blame
616 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9
# Install Java
RUN apt-get update && \
apt-get install -y default-jdk
# 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