hoangthiencm commited on
Commit
a986aca
·
verified ·
1 Parent(s): 4fbda48

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -13
Dockerfile CHANGED
@@ -1,13 +1,30 @@
1
- fastapi
2
- uvicorn
3
- python-multipart
4
- google-generativeai
5
- supabase
6
- pillow
7
- pydantic
8
- pymupdf
9
- python-docx
10
- latex2mathml
11
- pypandoc
12
- requests
13
- python-dotenv
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sử dụng Python 3.10
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # --- Cài đặt system dependencies (Cần cho Pandoc và xử lý ảnh) ---
7
+ RUN apt-get update && \
8
+ apt-get install -y \
9
+ pandoc \
10
+ build-essential \
11
+ libfreetype6-dev \
12
+ libjpeg-dev \
13
+ zlib1g-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Cập nhật pip
17
+ RUN pip install --upgrade pip setuptools wheel
18
+
19
+ # Copy requirements và cài đặt thư viện
20
+ COPY requirements.txt .
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy toàn bộ code vào
24
+ COPY . .
25
+
26
+ # Mở port 7860
27
+ EXPOSE 7860
28
+
29
+ # Lệnh chạy server (Quan trọng: chạy file server.py)
30
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]