razaali10 commited on
Commit
e54c37b
·
verified ·
1 Parent(s): bb3f7ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -1,25 +1,26 @@
1
- # Base image
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y git && \
9
  apt-get clean && rm -rf /var/lib/apt/lists/*
10
 
11
- # Set Matplotlib cache to a writable directory
12
  ENV MPLCONFIGDIR=/tmp/mplcache
13
 
14
  # Install Python dependencies
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy application code
19
  COPY app.py .
20
 
21
- # Expose the Gradio port
22
  EXPOSE 7860
23
 
24
- # Run the Gradio interface
25
  CMD ["python", "app.py"]
 
 
1
+ # Base Python image
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system-level packages
8
  RUN apt-get update && apt-get install -y git && \
9
  apt-get clean && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Set Matplotlib config to avoid permission issues
12
  ENV MPLCONFIGDIR=/tmp/mplcache
13
 
14
  # Install Python dependencies
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy app
19
  COPY app.py .
20
 
21
+ # Required for HF Spaces
22
  EXPOSE 7860
23
 
24
+ # Run the app
25
  CMD ["python", "app.py"]
26
+