Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -2,16 +2,18 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Cài curl
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
-
# Cài llama-cpp-python từ wheel đã biên dịch sẵn
|
| 9 |
RUN pip install --no-cache-dir \
|
| 10 |
https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.23/llama_cpp_python-0.3.23-cp310-cp310-manylinux_2_17_x86_64.whl
|
| 11 |
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
|
|
|
| 15 |
COPY . .
|
| 16 |
|
|
|
|
| 17 |
CMD ["python", "app.py"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Cài curl (cần cho việc tải model, nếu dùng)
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# Cài llama-cpp-python từ wheel đã biên dịch sẵn – tiết kiệm RAM build tối đa
|
| 9 |
RUN pip install --no-cache-dir \
|
| 10 |
https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.23/llama_cpp_python-0.3.23-cp310-cp310-manylinux_2_17_x86_64.whl
|
| 11 |
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Copy code vào sau cùng
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Chạy app
|
| 19 |
CMD ["python", "app.py"]
|