prthm11 commited on
Commit
7ec6a6a
·
verified ·
1 Parent(s): 330c423

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -39
Dockerfile CHANGED
@@ -1,39 +1,39 @@
1
- # Base image with Python and common dependencies
2
- FROM python:3.10-slim
3
-
4
- # Set environment variables
5
- ENV DEBIAN_FRONTEND=noninteractive
6
- ENV PYTHONUNBUFFERED=1
7
- ENV PYTHONDONTWRITEBYTECODE=1
8
-
9
- # Install system dependencies
10
- RUN apt-get update && apt-get install -y \
11
- build-essential \
12
- libglib2.0-0 \
13
- libsm6 \
14
- libxext6 \
15
- libxrender-dev \
16
- tesseract-ocr \
17
- poppler-utils \
18
- libgl1 \
19
- && apt-get clean && rm -rf /var/lib/apt/lists/*
20
-
21
- RUN pip install -r requirements.txt
22
- RUN mkdir -p /app/cache /app/data && chmod -R 777 /app/cache /app/data
23
- RUN mkdir -p /app/OUTPUTS
24
- RUN chmod -R 777 /app
25
-
26
- # Set working directory
27
- WORKDIR /app
28
-
29
- # Copy requirements file and install Python dependencies
30
- COPY requirements.txt requirements.txt
31
- COPY extract_img_pdf.py extract_img_pdf.py
32
- COPY templates/ /app/templates
33
- COPY .env .env
34
-
35
- # Expose the required port for HF Spaces
36
- EXPOSE 7860
37
-
38
- # Set the command to run your Flask app
39
- CMD ["python", "extract_img_pdf.py"]
 
1
+ # Base image with Python and common dependencies
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV PYTHONUNBUFFERED=1
7
+ ENV PYTHONDONTWRITEBYTECODE=1
8
+
9
+ # Install system dependencies
10
+ RUN apt-get update && apt-get install -y \
11
+ build-essential \
12
+ libglib2.0-0 \
13
+ libsm6 \
14
+ libxext6 \
15
+ libxrender-dev \
16
+ tesseract-ocr \
17
+ poppler-utils \
18
+ libgl1 \
19
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
20
+
21
+ RUN pip install -r requirements.txt
22
+ RUN mkdir -p /app/cache /app/data && chmod -R 777 /app/cache /app/data
23
+ RUN mkdir -p /app/OUTPUTS
24
+ RUN chmod -R 777 /app
25
+
26
+ # Set working directory
27
+ WORKDIR /app
28
+
29
+ # Copy requirements file and install Python dependencies
30
+ COPY requirements.txt requirements.txt
31
+ COPY extract_img_pdf.py extract_img_pdf.py
32
+ COPY templates/ /app/templates
33
+ COPY .env .env
34
+
35
+ # Expose the required port for HF Spaces
36
+ EXPOSE 7860
37
+
38
+ # Set the command to run your Flask app
39
+ CMD ["python", "extract_img_pdf.py"]