awacke1 commited on
Commit
598e1e1
·
verified ·
1 Parent(s): b8f61f5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
  FROM python:3.9
2
 
3
- # Install OpenGL dependencies
4
  RUN apt-get update && \
5
- apt-get install -y libgl1-mesa-glx libgl1-mesa-dev
6
 
7
  # Set the working directory in the container
8
  WORKDIR /app
@@ -13,5 +13,8 @@ COPY app.py .
13
  # Install the required Python dependencies
14
  RUN pip install pyglet arcade pygame
15
 
16
- # Run the app.py script when the container starts
17
- CMD ["python", "app.py"]
 
 
 
 
1
  FROM python:3.9
2
 
3
+ # Install OpenGL dependencies and Xvfb
4
  RUN apt-get update && \
5
+ apt-get install -y libgl1-mesa-glx libgl1-mesa-dev xvfb
6
 
7
  # Set the working directory in the container
8
  WORKDIR /app
 
13
  # Install the required Python dependencies
14
  RUN pip install pyglet arcade pygame
15
 
16
+ # Set the display environment variable
17
+ ENV DISPLAY=:99
18
+
19
+ # Run Xvfb and the app.py script when the container starts
20
+ CMD Xvfb :99 & python app.py