-
Couldn't load subscription status.
- Fork 26
👷 use UV package manager #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1c3416
4166fdc
9c14ae0
6840992
a473987
1f4567a
256ad17
19fd1b7
c27d7ca
abd8bcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| vllm_spyre/model_executor/model_loader/spyre_setup.py | ||
| .venv | ||
| .conda | ||
| .mypy_cache | ||
| .pytest_cache |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,21 +15,19 @@ RUN microdnf update -y && microdnf install -y \ | |
| RUN ln -sf $(which python${PYTHON_VERSION}) /usr/bin/python && \ | ||
| ln -sf $(which pip${PYTHON_VERSION}) /usr/bin/pip | ||
|
|
||
| # Download and install vllm ########################################################### | ||
| RUN git clone --depth 1 https://github.com/vllm-project/vllm.git \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no more installing vllm manually 😎😎😎 |
||
| && cd vllm \ | ||
| && git fetch --tags \ | ||
| && git checkout v0.8.0 \ | ||
| && python -m pip install --upgrade pip \ | ||
| && pip3 install torch=="2.5.1+cpu" --index-url https://download.pytorch.org/whl/cpu \ | ||
| && python use_existing_torch.py \ | ||
| && pip install -r requirements/build.txt \ | ||
| && SETUPTOOLS_SCM_PRETEND_VERSION=0.8.0 VLLM_TARGET_DEVICE=empty pip install --verbose . --no-build-isolation | ||
|
|
||
| # Install vllm Spyre plugin ################################################################## | ||
| RUN mkdir /workspace/vllm-spyre | ||
| COPY . /workspace/vllm-spyre | ||
| RUN cd /workspace/vllm-spyre && pip install -v -e . | ||
| # Torch must be installed first | ||
| RUN pip install torch==2.5.1+cpu --index-url https://download.pytorch.org/whl/cpu | ||
| # Install uv | ||
| RUN pip install uv | ||
| # Install the plugin in a new venv, along with dev deps to test with | ||
| RUN cd /workspace/vllm-spyre \ | ||
| && uv venv .venv --system-site-packages \ | ||
| && source .venv/bin/activate \ | ||
| && VLLM_TARGET_DEVICE=empty uv pip install -v -e . --system \ | ||
| && uv sync --frozen --group dev | ||
| ENV VLLM_PLUGINS=spyre | ||
|
|
||
| CMD ["/bin/bash"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,46 @@ | ||
| [build-system] | ||
| requires = [ | ||
| "setuptools>=48", | ||
| ] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "vllm-spyre" | ||
| description = "vLLM plugin for Spyre hardware support" | ||
| readme = "README.md" | ||
| license = {text = "Apache 2"} | ||
| version = "0.0.0" # TODO dynamic versioning | ||
| dependencies = [ | ||
| "fms-model-optimizer>=0.2.0", | ||
| "ibm-fms==0.0.8", | ||
| "vllm", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can specify vllm and fms-model-optimizer, and don't have to worry about either of them overriding torch 👍 |
||
| ] | ||
|
|
||
| [project.entry-points."vllm.platform_plugins"] | ||
| spyre = "vllm_spyre:register" | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| where = ["."] # list of folders that contain the packages (["."] by default) | ||
| include = ["vllm_spyre"] # package names should match these glob patterns (["*"] by default) | ||
| exclude = [] # exclude packages matching these glob patterns (empty by default) | ||
| namespaces = false # to disable scanning PEP 420 namespaces (true by default) | ||
|
|
||
|
|
||
| [tool.setuptools_scm] | ||
| # version_file = "vllm_spyre/_version.py" # currently handled by `setup.py:get_version()` | ||
|
|
||
| [tool.uv] | ||
| # Never install torch, so that no dependencies can override it. | ||
| # This requires that torch is installed separately in the target environment | ||
| override-dependencies = [ | ||
| "torch; sys_platform == 'never'", | ||
| "torchaudio; sys_platform == 'never'", | ||
| "torchvision; sys_platform == 'never'", | ||
| ] | ||
|
|
||
| [tool.uv.sources] | ||
| vllm = { git = "https://github.com/vllm-project/vllm", rev = "v0.8.0" } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specifying the source for vllm allows |
||
|
|
||
| [tool.ruff] | ||
| # Allow lines to be as long as 80. | ||
| line-length = 80 | ||
|
|
@@ -78,3 +118,26 @@ plugins.md013.enabled = false # line-length | |
| plugins.md041.enabled = false # first-line-h1 | ||
| plugins.md033.enabled = false # inline-html | ||
| plugins.md024.allow_different_nesting = true # no-duplicate-headers | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "pytest==8.3.4", | ||
| "pytest-forked==1.6.0", | ||
| "pytest-timeout==2.3.1", | ||
| "requests==2.32.3", | ||
| "sentence-transformers==3.4.1", | ||
| ] | ||
| lint = [ | ||
| "clang-format==18.1.5", | ||
| "codespell==2.3.0", | ||
| "isort==5.13.2", | ||
| "mypy==1.11.1", | ||
| "pymarkdownlnt==0.9.26", | ||
| "ruff==0.6.5", | ||
| "toml==0.10.2", | ||
| "tomli==2.0.2", | ||
| "types-pyyaml>=6.0.12.20250326", | ||
| "types-requests>=2.32.0.20250328", | ||
| "types-setuptools>=77.0.2.20250328", | ||
| "yapf==0.43.0", | ||
| ] | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add mypy here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, though right now that's running on multiple Python versions. I assume that's to make sure that mypy will be happy with any version of Python that somebody wants to develop locally with. But I guess it's also not too hard to just run all these checks with every Python version as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we really need to run it with every python version, this is just inherited from upstream checks.