errantanomie commited on
Commit
b13ec53
·
verified ·
1 Parent(s): d8ff924

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ # Install Poppler
4
+ RUN apt-get update && apt-get install -y poppler-utils
5
+
6
+ # Verify Poppler installation and show exact path of pdfinfo
7
+ RUN which pdfinfo && pdfinfo -version
8
+
9
+ # Debug - try and find the location of pdfinfo
10
+ RUN find / -name "pdfinfo"
11
+
12
+ # Ensure Poppler is in PATH
13
+ ENV PATH="/usr/local/bin:/usr/bin:${PATH}"
14
+
15
+ # Set working directory
16
+ WORKDIR /app
17
+
18
+ # Install dependencies
19
+ COPY requirements.txt .
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy application code
23
+ COPY . /app
24
+
25
+ # Expose the port
26
+ EXPOSE 7860
27
+
28
+ # Run the app
29
+ CMD ["python", "app.py"]