wynai commited on
Commit
b5e1a86
·
verified ·
1 Parent(s): 32c2bce

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,23 +1,23 @@
1
  FROM python:3.11-slim
2
 
3
- # Cài đặt gói hệ thống cần thiết
4
  RUN apt-get update && apt-get install -y \
5
  git curl && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
- # Tạo thư mục ứng dụng
9
  WORKDIR /app
10
 
11
- # Cài docling-serve từ PyPI
12
- RUN pip install --no-cache-dir "docling-serve[ui]"
13
-
14
- # Cấu hình để chạy trên 0.0.0.0:7860
15
  ENV DOCLING_SERVE_ENABLE_UI=1 \
16
  DOCLING_SERVE_HOST=0.0.0.0 \
17
- DOCLING_SERVE_PORT=7860
 
 
 
 
 
 
 
18
 
19
- # Expose port
20
  EXPOSE 7860
21
 
22
- # Chạy server
23
  CMD ["docling-serve", "run"]
 
1
  FROM python:3.11-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  git curl && \
5
  rm -rf /var/lib/apt/lists/*
6
 
 
7
  WORKDIR /app
8
 
9
+ # Biến môi trường để tránh ghi vào thư mục root
 
 
 
10
  ENV DOCLING_SERVE_ENABLE_UI=1 \
11
  DOCLING_SERVE_HOST=0.0.0.0 \
12
+ DOCLING_SERVE_PORT=7860 \
13
+ EASYOCR_MODULE_PATH=/app/.easyocr
14
+
15
+ # Tạo thư mục lưu model EasyOCR
16
+ RUN mkdir -p /app/.easyocr
17
+
18
+ # Cài docling
19
+ RUN pip install --no-cache-dir "docling-serve[ui]"
20
 
 
21
  EXPOSE 7860
22
 
 
23
  CMD ["docling-serve", "run"]