Wckd314 commited on
Commit
4c48ca2
·
verified ·
1 Parent(s): 9063e34

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -27
Dockerfile CHANGED
@@ -1,27 +1,32 @@
1
- # Use official Python 3.9 image
2
- FROM python:3.9-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Install system dependencies for PyMuPDF
8
- RUN apt-get update && apt-get install -y \
9
- build-essential \
10
- libgl1-mesa-glx \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Copy requirements and install
14
- COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
-
17
- # Copy everything else
18
- COPY . .
19
-
20
- # Create jobs directory for temporary storage
21
- RUN mkdir -p /app/jobs && chmod 777 /app/jobs
22
-
23
- # Expose port (HF Spaces uses 7860)
24
- EXPOSE 7860
25
-
26
- # Command to run uvicorn
27
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
1
+ # Use official Python 3.9 image
2
+ FROM python:3.9-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies for PyMuPDF
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ libgl1 \
11
+ libglib2.0-0 \
12
+ libsm6 \
13
+ libxext6 \
14
+ libxrender1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements and install
18
+ COPY requirements.txt .
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy everything else
22
+ COPY . .
23
+
24
+ # Create jobs directory for temporary storage
25
+ RUN mkdir -p /app/jobs && chmod 777 /app/jobs
26
+
27
+ # Expose port (HF Spaces uses 7860)
28
+ EXPOSE 7860
29
+
30
+ # Command to run uvicorn
31
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
32
+