Skip to content
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

Switch user instructions to install iree-turbine from PyPI. #438

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading