Skip to content

Commit

Permalink
[FEATURE] Add UV PIP usage instructions information (ModelCloud#114)
Browse files Browse the repository at this point in the history
* Add uv pip usage instructions information ModelCloud#108

* Fix incorrect information

* Installation information optimization
  • Loading branch information
CL-ModelCloud authored Jun 29, 2024
1 parent 824f5d9 commit e35b3a3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ git clone https://github.com/ModelCloud/GPTQModel.git && cd GPTQModel

# compile and install
pip install -vvv --no-build-isolation .

# If you have `uv` package version 0.1.16 or higher, you can use `uv pip` for potentially better dependency management
uv pip install -vvv --no-build-isolation .
```

### Script installation
```bash
bash install.sh
```

### PIP (PENDING RELEASE)
Expand Down
22 changes: 22 additions & 0 deletions install.sh
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

0 comments on commit e35b3a3

Please sign in to comment.