Skip to content

Commit

Permalink
Pin dependencies version (#70)
Browse files Browse the repository at this point in the history
* init

* remove req

* update gradio

* add itables

* format toml

* update description

* update gradio dep

* add einops

* update docs build yml

* update docs test

* update docs build

* timm is not optional

* add triton
  • Loading branch information
dnth authored Nov 20, 2024
1 parent e6c32cf commit 45f3588
Show file tree
Hide file tree
Showing 7 changed files with 5,094 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
pip install --no-cache-dir Cython
pip install -r requirements.txt -r requirements_dev.txt
pip install -r requirements_dev.txt
pip install .
# - name: Discover typos with codespell
# run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf,./.git" --ignore-words-list="aci,acount,hist"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --user --no-cache-dir Cython
pip install --user -r requirements.txt -r requirements_dev.txt
pip install --user -r requirements_dev.txt
pip install .
# - name: Discover typos with codespell
# run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# pixi environments
.pixi
*.egg-info
5,045 changes: 5,045 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

62 changes: 41 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
[project]
name = "xinfer"
version = "0.3.1"
dynamic = [
"dependencies",
]
description = "A unified interface to run inference on machine learning libraries."
description = "Framework agnostic computer vision inference. Run 1000+ models by changing only one line of code. Supports models from transformers, timm, ultralytics, vllm, ollama and your custom model."
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"xinfer",
]
license = {text = "Apache Software License 2.0"}
authors = [
{name = "Dickson Neoh", email = "[email protected]"},
dependencies = [
"loguru",
"rich>=13.9.4,<14",
"requests>=2.32.3,<3",
"pillow>=10.4.0,<11",
"ray[serve]>=2.38.0,<3",
"fastapi>=0.115.5,<0.116",
"timm>=1.0.11,<2",
"gradio>=5.5.0,<6",
"itables>=2.2.3,<3",
"einops>=0.8.0,<0.9",
]
keywords = ["xinfer"]
license = { text = "Apache Software License 2.0" }
authors = [{ name = "Dickson Neoh", email = "[email protected]" }]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand All @@ -27,22 +32,16 @@ classifiers = [
xinfer = "xinfer.cli:main"

[project.optional-dependencies]
timm = ["timm"]
ultralytics = ["ultralytics"]
transformers = ["transformers", "accelerate"]
vllm = ["vllm"]
vllm = ["vllm", "triton"]
ollama = ["ollama"]
all = ["timm", "ultralytics", "transformers", "vllm", "ollama", "accelerate"]
all = ["ultralytics", "transformers", "vllm", "ollama", "accelerate", "triton"]

[tool]
[tool.setuptools.packages.find]
include = ["xinfer*"]
exclude = ["docs*"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}


[tool.distutils.bdist_wheel]
universal = true

Expand All @@ -64,9 +63,7 @@ replace = '__version__ = "{new_version}"'


[tool.flake8]
exclude = [
"docs",
]
exclude = ["docs"]
max-line-length = 88


Expand All @@ -76,3 +73,26 @@ Homepage = "https://github.com/dnth/xinfer"
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.pixi.project]
channels = ["conda-forge", "nvidia", "pytorch"]
platforms = ["linux-64"]

[tool.pixi.pypi-dependencies]
xinfer = { path = ".", editable = true }

[tool.pixi.environments]
default = { solve-group = "default" }
cuda = { solve-group = "cuda" }

[tool.pixi.tasks]

[tool.pixi.dependencies]
pytorch = ">=2.2.0,<3"
python = "3.11.*"
torchvision = ">=0.19.1,<0.20"



[system-requirements]
cuda = "12.4" # Specify the desired CUDA version
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

0 comments on commit 45f3588

Please sign in to comment.