Raymond Weitekamp commited on
Commit
5974831
·
1 Parent(s): c0aa6b3

Add libxrender1 and xvfb, run with xvfb-run

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -10,6 +10,8 @@ RUN apt-get update && apt-get install -y \
10
  libgl1-mesa-dev \
11
  libx11-6 \
12
  libx11-dev \
 
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Create matplotlib config directory with proper permissions
@@ -41,5 +43,5 @@ RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvs
41
  # Expose port 7860 for Hugging Face Spaces
42
  EXPOSE 7860
43
 
44
- # Run the application
45
- CMD ["python", "-c", "import cadviewer; from nicegui import app; app.native.start_args['port'] = 7860; cadviewer.ui.run(native=False, host='0.0.0.0', port=7860)"]
 
10
  libgl1-mesa-dev \
11
  libx11-6 \
12
  libx11-dev \
13
+ libxrender1 \
14
+ xvfb \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Create matplotlib config directory with proper permissions
 
43
  # Expose port 7860 for Hugging Face Spaces
44
  EXPOSE 7860
45
 
46
+ # Run the application with xvfb-run
47
+ CMD ["xvfb-run", "--auto-servernum", "python", "-c", "import cadviewer; from nicegui import app; app.native.start_args['port'] = 7860; cadviewer.ui.run(native=False, host='0.0.0.0', port=7860)"]