init project
Browse files- Dockerfile +11 -1
Dockerfile
CHANGED
|
@@ -1,10 +1,20 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
| 4 |
COPY . .
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
RUN pip install --upgrade pip
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
|
|
|
| 9 |
EXPOSE 7860
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Tạo thư mục làm việc
|
| 4 |
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Sao chép toàn bộ nội dung project
|
| 7 |
COPY . .
|
| 8 |
|
| 9 |
+
# ✅ Tạo thư mục FAISS index và gán quyền đầy đủ
|
| 10 |
+
RUN mkdir -p faiss_index && chmod -R 777 faiss_index
|
| 11 |
+
|
| 12 |
+
# Cài đặt dependencies
|
| 13 |
RUN pip install --upgrade pip
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# Mở port cho FastAPI & Gradio
|
| 17 |
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Khởi chạy app
|
| 20 |
+
CMD ["python", "app.py"]
|