Really-amin commited on
Commit
e49fcd0
·
verified ·
1 Parent(s): 84fb503

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -22
Dockerfile CHANGED
@@ -1,22 +1,32 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install required system packages
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- poppler-utils \
9
- tesseract-ocr \
10
- libgl1 \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Copy all project files
14
- COPY . .
15
-
16
- # Install Python dependencies
17
- RUN pip install --no-cache-dir -r requirements.txt
18
-
19
- EXPOSE 7860
20
-
21
- # Run FastAPI app
22
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install required system packages
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ wget \
10
+ curl \
11
+ poppler-utils \
12
+ tesseract-ocr \
13
+ libgl1 \
14
+ locales \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Set UTF-8 locale
18
+ ENV LANG=C.UTF-8
19
+ ENV LC_ALL=C.UTF-8
20
+
21
+ # Copy all project files
22
+ COPY . .
23
+
24
+ # Upgrade pip and install Python dependencies
25
+ RUN pip install --upgrade pip && \
26
+ pip install --no-cache-dir -r requirements.txt
27
+
28
+ # Expose FastAPI port
29
+ EXPOSE 7860
30
+
31
+ # Run FastAPI app
32
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]