Skip to content

Commit

Permalink
Switch user instructions to install iree-turbine from PyPI. (#438)
Browse files Browse the repository at this point in the history
Progress on #294 and
#359.

Now that a new release of `iree-turbine` is available
(https://pypi.org/project/iree-turbine/#history,
https://github.com/iree-org/iree-turbine/releases/tag/v2.5.0, we can
drop the requirement to use source builds or nightly packages.
Developers will still likely want to use the latest versions of
`iree-turbine`, `iree-compiler`, and `iree-runtime`, and that is what
the CI jobs are testing. We could also add separate CI jobs that use
stable versions of each package.
  • Loading branch information
ScottTodd authored Nov 7, 2024
1 parent 1ea095a commit 79fe7e2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
7 changes: 1 addition & 6 deletions docs/model_cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,13 @@ tokenizer_config.json: 100%|█████████████████

Setup (from [README.md](../README.md)):

* TODO: this could be replaced with `pip install iree-turbine` or
`pip install sharktank` at some point. For now these are dev packages.

```bash
# Setup venv.
python -m venv --prompt sharktank .venv
source .venv/bin/activate

# Install requirements.
# (Optional) Install PyTorch for CPU only, to save on download time.
pip install -r pytorch-cpu-requirements.txt
pip install -f https://iree.dev/pip-release-links.html --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"

# Install local projects.
pip install -r requirements.txt -e sharktank/ shortfin/
Expand Down
34 changes: 27 additions & 7 deletions docs/nightly_releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ source 3.11.venv/bin/activate
# Install 'sharktank' package from nightly releases.
python -m pip install sharktank -f https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels

# Install iree-turbine from source
# TODO(#294): publish newer iree-turbine package so this isn't necessary.
python -m pip install -f https://iree.dev/pip-release-links.html --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"

# Install some other dependencies.
# TODO(#294): list these as "dependencies" in `pyproject.toml` or make optional?
python -m pip install gguf numpy huggingface-hub transformers datasets \
Expand All @@ -90,8 +85,8 @@ deactivate

```bash
# Set up a virtual environment to isolate packages from other envs.
python3.12 -m venv 3.12.venv
source 3.12.venv/bin/activate
python3.11 -m venv 3.11.venv
source 3.11.venv/bin/activate

# Install 'shortfin' package from nightly releases.
python -m pip install shortfin -f https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels
Expand All @@ -102,3 +97,28 @@ python -c "import shortfin as sf; print('Sanity check passed')"
# Deactivate the virtual environment when done.
deactivate
```

## Installing newer versions of dependencies

To install the `iree-turbine` package from the latest source:

```bash
python -m pip install --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
```

To install the `iree-compiler` and `iree-runtime` packages from nightly
releases:

```bash
python -m pip install -f https://iree.dev/pip-release-links.html --upgrade \
iree-compiler iree-runtime
```

To install all three packages together:

```bash
python -m pip install -f https://iree.dev/pip-release-links.html --upgrade \
iree-compiler iree-runtime --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
```
File renamed without changes.

0 comments on commit 79fe7e2

Please sign in to comment.