Spaces:
Sleeping
Sleeping
ShunTay12 commited on
Commit ·
45ce52b
1
Parent(s): b93c015
Update dockerfile and pyproject toml
Browse files- Dockerfile +2 -1
- pyproject.toml +1 -1
Dockerfile
CHANGED
|
@@ -10,11 +10,12 @@ ENV UV_PROJECT_ENVIRONMENT=/app/.venv
|
|
| 10 |
# Prefer CPU wheels for torch/torchvision and increase timeout for large wheels
|
| 11 |
ENV UV_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
|
| 12 |
ENV UV_HTTP_TIMEOUT=120
|
|
|
|
| 13 |
|
| 14 |
# Install dependencies with uv (uses cache for speed)
|
| 15 |
COPY pyproject.toml uv.lock ./
|
| 16 |
RUN --mount=type=cache,target=/root/.cache/uv \
|
| 17 |
-
uv lock --upgrade && \
|
| 18 |
uv sync --no-dev --index-strategy unsafe-best-match
|
| 19 |
|
| 20 |
# Copy the rest of the project
|
|
|
|
| 10 |
# Prefer CPU wheels for torch/torchvision and increase timeout for large wheels
|
| 11 |
ENV UV_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
|
| 12 |
ENV UV_HTTP_TIMEOUT=120
|
| 13 |
+
ENV UV_INDEX_STRATEGY=unsafe-best-match
|
| 14 |
|
| 15 |
# Install dependencies with uv (uses cache for speed)
|
| 16 |
COPY pyproject.toml uv.lock ./
|
| 17 |
RUN --mount=type=cache,target=/root/.cache/uv \
|
| 18 |
+
uv lock --upgrade --index-strategy unsafe-best-match && \
|
| 19 |
uv sync --no-dev --index-strategy unsafe-best-match
|
| 20 |
|
| 21 |
# Copy the rest of the project
|
pyproject.toml
CHANGED
|
@@ -3,7 +3,7 @@ name = "model-fast-api"
|
|
| 3 |
version = "0.1.0"
|
| 4 |
description = "Add your description here"
|
| 5 |
readme = "README.md"
|
| 6 |
-
requires-python = ">=3.12"
|
| 7 |
dependencies = [
|
| 8 |
"fastapi>=0.118.0",
|
| 9 |
"langchain>=0.3.27",
|
|
|
|
| 3 |
version = "0.1.0"
|
| 4 |
description = "Add your description here"
|
| 5 |
readme = "README.md"
|
| 6 |
+
requires-python = ">=3.12,<3.13"
|
| 7 |
dependencies = [
|
| 8 |
"fastapi>=0.118.0",
|
| 9 |
"langchain>=0.3.27",
|