Spaces:
Sleeping
Sleeping
Reduce image size
Browse files- Dockerfile +1 -1
- flower_apps/quickstart_huggingface/pyproject.toml +11 -2
- pyproject.toml +14 -1
- uv.lock +0 -0
Dockerfile
CHANGED
|
@@ -19,7 +19,7 @@ COPY pyproject.toml uv.lock ./
|
|
| 19 |
|
| 20 |
# Install dependencies into the virtual environment using uv
|
| 21 |
# This is faster than pip and uses the lock file for reproducible builds.
|
| 22 |
-
RUN uv sync --locked --no-cache
|
| 23 |
|
| 24 |
|
| 25 |
# This stage creates the final, lean image for production.
|
|
|
|
| 19 |
|
| 20 |
# Install dependencies into the virtual environment using uv
|
| 21 |
# This is faster than pip and uses the lock file for reproducible builds.
|
| 22 |
+
RUN uv sync --locked --no-cache --index-strategy=unsafe-best-match
|
| 23 |
|
| 24 |
|
| 25 |
# This stage creates the final, lean image for production.
|
flower_apps/quickstart_huggingface/pyproject.toml
CHANGED
|
@@ -12,13 +12,22 @@ authors = [
|
|
| 12 |
{ name = "Kaushik Amar Das", email = "kaushik.das@iiitg.ac.in" },
|
| 13 |
]
|
| 14 |
dependencies = [
|
| 15 |
-
"flwr[simulation]>=1.
|
| 16 |
"flwr-datasets>=0.5.0",
|
| 17 |
-
"torch
|
| 18 |
"transformers>=4.30.0,<5.0",
|
| 19 |
"evaluate>=0.4.0,<1.0",
|
| 20 |
"datasets>=2.0.0, <3.0",
|
| 21 |
"scikit-learn>=1.3.1, <2.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
]
|
| 23 |
|
| 24 |
[tool.hatch.build.targets.wheel]
|
|
|
|
| 12 |
{ name = "Kaushik Amar Das", email = "kaushik.das@iiitg.ac.in" },
|
| 13 |
]
|
| 14 |
dependencies = [
|
| 15 |
+
"flwr[simulation]>=1.21.0",
|
| 16 |
"flwr-datasets>=0.5.0",
|
| 17 |
+
"torch>=2.8.0",
|
| 18 |
"transformers>=4.30.0,<5.0",
|
| 19 |
"evaluate>=0.4.0,<1.0",
|
| 20 |
"datasets>=2.0.0, <3.0",
|
| 21 |
"scikit-learn>=1.3.1, <2.0",
|
| 22 |
+
"markupsafe==2.1.3"
|
| 23 |
+
]
|
| 24 |
+
|
| 25 |
+
[tool.uv.sources]
|
| 26 |
+
torch = [
|
| 27 |
+
{ index = "pytorch-cpu" },
|
| 28 |
+
]
|
| 29 |
+
torchvision = [
|
| 30 |
+
{ index = "pytorch-cpu" },
|
| 31 |
]
|
| 32 |
|
| 33 |
[tool.hatch.build.targets.wheel]
|
pyproject.toml
CHANGED
|
@@ -6,15 +6,28 @@ readme = "README.md"
|
|
| 6 |
requires-python = ">=3.11"
|
| 7 |
dependencies = [
|
| 8 |
"apscheduler>=3.11.0",
|
| 9 |
-
"flwr[simulation]>=1.
|
| 10 |
"flwr-datasets>=0.5.0",
|
| 11 |
"gradio[oauth]>=5.44.1",
|
| 12 |
"torch>=2.8.0",
|
| 13 |
"transformers>=4.56.1",
|
| 14 |
"scikit-learn>=1.7.1",
|
| 15 |
"evaluate>=0.4.5",
|
|
|
|
| 16 |
]
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
[tool.ruff.lint]
|
| 19 |
|
| 20 |
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
|
|
|
| 6 |
requires-python = ">=3.11"
|
| 7 |
dependencies = [
|
| 8 |
"apscheduler>=3.11.0",
|
| 9 |
+
"flwr[simulation]>=1.21.0",
|
| 10 |
"flwr-datasets>=0.5.0",
|
| 11 |
"gradio[oauth]>=5.44.1",
|
| 12 |
"torch>=2.8.0",
|
| 13 |
"transformers>=4.56.1",
|
| 14 |
"scikit-learn>=1.7.1",
|
| 15 |
"evaluate>=0.4.5",
|
| 16 |
+
"markupsafe==2.1.3"
|
| 17 |
]
|
| 18 |
|
| 19 |
+
[tool.uv.sources]
|
| 20 |
+
torch = [
|
| 21 |
+
{ index = "pytorch-cpu" },
|
| 22 |
+
]
|
| 23 |
+
torchvision = [
|
| 24 |
+
{ index = "pytorch-cpu" },
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
[[tool.uv.index]]
|
| 28 |
+
name = "pytorch-cpu"
|
| 29 |
+
url = "https://download.pytorch.org/whl/cpu"
|
| 30 |
+
|
| 31 |
[tool.ruff.lint]
|
| 32 |
|
| 33 |
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
uv.lock
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|