Spaces:
Sleeping
Sleeping
Dmitry Beresnev
commited on
Commit
·
0357485
1
Parent(s):
9d0ed97
fix dockerfile, pyproject.toml
Browse files- Dockerfile +6 -3
- pyproject.toml +4 -4
Dockerfile
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
-
FROM python:3.12
|
| 2 |
|
| 3 |
-
RUN pip install uv
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
COPY pyproject.toml /app/pyproject.toml
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
COPY . /app
|
| 12 |
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
RUN pip install --no-cache-dir uv
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
COPY pyproject.toml /app/pyproject.toml
|
| 8 |
|
| 9 |
+
# Install dependencies with binary wheels (avoid compilation)
|
| 10 |
+
ENV CMAKE_ARGS="-DLLAMA_BLAS=OFF -DLLAMA_AVX2=OFF" \
|
| 11 |
+
FORCE_CMAKE=0
|
| 12 |
+
RUN uv pip install --system --prefer-binary -r pyproject.toml
|
| 13 |
|
| 14 |
COPY . /app
|
| 15 |
|
pyproject.toml
CHANGED
|
@@ -7,8 +7,8 @@ authors = [
|
|
| 7 |
]
|
| 8 |
requires-python = ">=3.12"
|
| 9 |
dependencies = [
|
| 10 |
-
"fastapi",
|
| 11 |
-
"uvicorn",
|
| 12 |
-
"llama-cpp-python",
|
| 13 |
-
"huggingface-hub"
|
| 14 |
]
|
|
|
|
| 7 |
]
|
| 8 |
requires-python = ">=3.12"
|
| 9 |
dependencies = [
|
| 10 |
+
"fastapi>=0.104.0",
|
| 11 |
+
"uvicorn[standard]>=0.24.0",
|
| 12 |
+
"llama-cpp-python>=0.2.0",
|
| 13 |
+
"huggingface-hub>=0.19.0"
|
| 14 |
]
|