forked from ModelCloud/GPTQModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add UV PIP usage instructions information (ModelCloud#114)
* Add uv pip usage instructions information ModelCloud#108 * Fix incorrect information * Installation information optimization
- Loading branch information
1 parent
824f5d9
commit e35b3a3
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
INSTALL_COMMAND="pip install -vvv --no-build-isolation ." | ||
|
||
check_uv_version() { | ||
python - <<EOF | ||
from importlib.metadata import version, PackageNotFoundError | ||
try: | ||
print(version('uv')) | ||
except PackageNotFoundError: | ||
print('not found') | ||
EOF | ||
} | ||
|
||
UV_VERSION=$(check_uv_version) | ||
|
||
if [[ $UV_VERSION != "not found" && $(echo -e "$UV_VERSION\n0.1.16" | sort -V | head -n1) == "0.1.16" ]]; then | ||
INSTALL_COMMAND="uv $INSTALL_COMMAND" | ||
fi | ||
|
||
$INSTALL_COMMAND | ||
|