Raymond Weitekamp commited on
Commit
80f0cc6
·
1 Parent(s): 14bfa78

Fix matplotlib config and remove base_url parameter

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -7,6 +7,9 @@ RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
 
10
  # Copy only pyproject.toml first to leverage Docker cache
11
  COPY pyproject.toml .
12
 
@@ -19,4 +22,5 @@ COPY . .
19
  # Expose port 7860 for Hugging Face Spaces
20
  EXPOSE 7860
21
 
22
- 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)"]
 
 
7
  build-essential \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Create matplotlib config directory with proper permissions
11
+ ENV MPLCONFIGDIR=/tmp/matplotlib
12
+
13
  # Copy only pyproject.toml first to leverage Docker cache
14
  COPY pyproject.toml .
15
 
 
22
  # Expose port 7860 for Hugging Face Spaces
23
  EXPOSE 7860
24
 
25
+ # Run the application
26
+ CMD ["python", "-c", "import cadviewer; from nicegui import app; app.native.start_args['port'] = 7860; app.native.window_args.pop('base_url', None); cadviewer.ui.run(native=False, host='0.0.0.0', port=7860)"]