euler314 commited on
Commit
9c8e3da
·
verified ·
1 Parent(s): 683fa93

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -1,21 +1,26 @@
1
  # Dockerfile
2
  FROM python:3.10-slim
3
 
4
- # Prevent Python from writing .pyc files to disk and buffer stdout/stderr
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1
7
 
8
  WORKDIR /app
9
 
10
- # Install dependencies
11
- RUN pip install --upgrade pip
12
- RUN pip install gradio
 
 
13
 
14
- # Copy your app code
 
 
 
 
 
15
  COPY app.py .
16
 
17
- # Expose Gradio’s default port
18
  EXPOSE 7860
19
 
20
- # Launch the app
21
  CMD ["python", "app.py"]
 
1
  # Dockerfile
2
  FROM python:3.10-slim
3
 
4
+ # Avoid .pyc and enable unbuffered logs
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1
7
 
8
  WORKDIR /app
9
 
10
+ # Install system deps for PyMuPDF
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends \
13
+ libmupdf-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Install Python deps
17
+ COPY requirements.txt .
18
+ RUN pip install --upgrade pip && \
19
+ pip install -r requirements.txt
20
+
21
+ # Copy application code
22
  COPY app.py .
23
 
 
24
  EXPOSE 7860
25
 
 
26
  CMD ["python", "app.py"]