-
Notifications
You must be signed in to change notification settings - Fork 573
Moved common requirements from docker and setup.py to file #1880
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 2 commits
9f292a7
3492111
8d4f69e
13a4739
5c8e6f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apache-tvm-ffi==0.1.0b15 | ||
| click | ||
| einops | ||
| ninja | ||
| numpy | ||
| nvidia-cudnn-frontend>=1.13.0 | ||
| nvidia-cutlass-dsl>=4.2.1 | ||
| nvidia-ml-py | ||
| packaging>=24.2 | ||
| requests | ||
| tabulate | ||
| torch | ||
|
Contributor
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.
|
||
| tqdm | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,21 +41,21 @@ def generate_build_meta() -> None: | |
|
|
||
| ext_modules: List[setuptools.Extension] = [] | ||
| cmdclass: Mapping[str, type[setuptools.Command]] = {} | ||
| install_requires = [ | ||
| "numpy", | ||
| "torch", | ||
| "ninja", | ||
| "requests", | ||
| "nvidia-ml-py", | ||
| "einops", | ||
| "click", | ||
| "tqdm", | ||
| "tabulate", | ||
| "apache-tvm-ffi==0.1.0b15", | ||
| "packaging>=24.2", | ||
| "nvidia-cudnn-frontend>=1.13.0", | ||
| "nvidia-cutlass-dsl>=4.2.1", | ||
| ] | ||
|
|
||
|
|
||
| def get_install_requires() -> List[str]: | ||
| """Read install requirements from requirements.txt.""" | ||
| requirements_file = root / "requirements.txt" | ||
| if not requirements_file.exists(): | ||
| return [] | ||
|
Comment on lines
+49
to
+50
Contributor
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. Silently returning an empty list when |
||
| return [ | ||
| line.strip() | ||
| for line in requirements_file.read_text().splitlines() | ||
| if line.strip() and not line.strip().startswith("#") | ||
| ] | ||
|
|
||
|
|
||
| install_requires = get_install_requires() | ||
| generate_build_meta() | ||
|
|
||
|
|
||
|
|
||
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.
To improve efficiency, you can combine these two
pip installcommands into a single call. This allowspipto perform dependency resolution once for all packages, which is faster and can help avoid potential dependency conflicts.