mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
use uv
This commit is contained in:
parent
7a6f87de3e
commit
b76f3b84ee
5 changed files with 3477 additions and 29 deletions
|
|
@ -1,32 +1,35 @@
|
|||
[tool.poetry]
|
||||
[project]
|
||||
name = "archgw"
|
||||
version = "0.3.15"
|
||||
description = "Python-based CLI tool to manage Arch Gateway."
|
||||
authors = ["Katanemo Labs, Inc."]
|
||||
packages = [
|
||||
{ include = "cli" }
|
||||
authors = [
|
||||
{ name = "Katanemo Labs, Inc." }
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"archgw_modelserver>=0.3.15",
|
||||
"click>=8.1.7",
|
||||
"jinja2>=3.1.4",
|
||||
"jsonschema>=4.23.0",
|
||||
"setuptools==75.5.0",
|
||||
"pyyaml>=6.0.2",
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
archgw_modelserver = "^0.3.15"
|
||||
click = "^8.1.7"
|
||||
jinja2 = "^3.1.4"
|
||||
jsonschema = "^4.23.0"
|
||||
setuptools = "75.5.0"
|
||||
pyyaml = "^6.0.2"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
[project.scripts]
|
||||
archgw = "cli.main:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = "^8.4.1"
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["cli"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = ["-v"]
|
||||
|
|
|
|||
1449
arch/tools/uv.lock
generated
1449
arch/tools/uv.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,2 +1,30 @@
|
|||
# Model Server Package #
|
||||
This model server package is a dependency of the Arch intelligent prompt gateway. It should not be used alone. Please refer to the [quickstart-guide](https://github.com/katanemo/arch?tab=readme-ov-file#quickstart) for more details on how to get start with Arch.
|
||||
|
||||
## Local development
|
||||
|
||||
You can start/stop the local server via the CLI entry point exposed by this package.
|
||||
|
||||
Using uv (recommended):
|
||||
|
||||
```sh
|
||||
uv run model_server --help
|
||||
# run in foreground (stays attached until Ctrl+C)
|
||||
uv run model_server start --port 51000 --foreground
|
||||
# run in background (then stop using the CLI)
|
||||
uv run model_server start --port 51000
|
||||
uv run model_server stop
|
||||
```
|
||||
|
||||
Alternative without uv:
|
||||
|
||||
```sh
|
||||
python -m src.cli --help
|
||||
# foreground
|
||||
python -m src.cli start --port 51000 --foreground
|
||||
# background
|
||||
python -m src.cli start --port 51000
|
||||
python -m src.cli stop
|
||||
```
|
||||
|
||||
The FastAPI app lives at `src.main:app` and exposes a health check at `/healthz`.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ setuptools = "75.5.0"
|
|||
|
||||
[tool.poetry.scripts]
|
||||
archgw_modelserver = "src.cli:main"
|
||||
# Convenient alias to match the PEP 621 script name used by `uv`
|
||||
model_server = "src.cli:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
|
|
@ -44,3 +46,46 @@ addopts = ["-v", "-s"]
|
|||
retries = 2
|
||||
retry_delay = 0.5
|
||||
cumulative_timing = false
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# PEP 621 project metadata for tools like `uv` that expect a [project] table.
|
||||
# This co-exists with Poetry's configuration above and is used for local runs.
|
||||
# ---------------------------------------------------------------------------
|
||||
[project]
|
||||
name = "archgw_modelserver"
|
||||
version = "0.3.15"
|
||||
description = "A model server for serving models"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<4.0"
|
||||
license = { text = "Apache-2.0" }
|
||||
authors = [
|
||||
{ name = "Katanemo Labs, Inc", email = "info@katanemo.com" }
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"fastapi==0.115.0",
|
||||
"torch==2.6.0",
|
||||
"uvicorn==0.31.0",
|
||||
"transformers>=4.37.0,<5.0.0",
|
||||
"accelerate>=1.0.0,<2.0.0",
|
||||
"pydantic>=2.10.1,<3.0.0",
|
||||
"dateparser",
|
||||
"openai>=1.50.2,<2.0.0",
|
||||
"httpx==0.27.2",
|
||||
"pytest-asyncio",
|
||||
"pytest",
|
||||
"opentelemetry-api>=1.28.0,<2.0.0",
|
||||
"opentelemetry-sdk>=1.28.0,<2.0.0",
|
||||
"opentelemetry-exporter-otlp>=1.28.0,<2.0.0",
|
||||
"opentelemetry-instrumentation-fastapi==0.49b0",
|
||||
"overrides>=7.7.0,<8.0.0",
|
||||
"pytest-retry>=1.6.3,<2.0.0",
|
||||
"pytest-httpserver>=1.1.0,<2.0.0",
|
||||
"setuptools==75.5.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
# Preferred local CLI name
|
||||
model_server = "src.cli:main"
|
||||
# Backwards-compatible alias matching Poetry's entry point
|
||||
archgw_modelserver = "src.cli:main"
|
||||
|
|
|
|||
1945
model_server/uv.lock
generated
Normal file
1945
model_server/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue