Spaces:
Sleeping
Sleeping
Commit ·
cc0dad6
1
Parent(s): 8af8343
fix build memory
Browse files- Dockerfile +5 -4
- requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
WORKDIR /app
|
| 3 |
-
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 4 |
-
RUN pip install --
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
-
RUN pip install -r requirements.txt
|
| 7 |
COPY . .
|
| 8 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
WORKDIR /app
|
| 3 |
+
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN pip install --no-cache-dir llama-cpp-python==0.3.23 \
|
| 5 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 6 |
COPY requirements.txt .
|
| 7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
COPY . .
|
| 9 |
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
fastapi
|
| 2 |
uvicorn
|
| 3 |
-
llama-cpp-python
|
| 4 |
huggingface_hub
|
|
|
|
| 1 |
fastapi
|
| 2 |
uvicorn
|
|
|
|
| 3 |
huggingface_hub
|