|
1 | 1 | # Nightly releases
|
2 | 2 |
|
3 |
| -> [!WARNING] |
4 |
| -> This is still under development! See |
5 |
| -> https://github.com/nod-ai/shark-ai/issues/400. |
6 |
| -> |
7 |
| -> These instructions will be converted into a user guide once stable packages |
8 |
| -> are published to PyPI: <https://github.com/nod-ai/shark-ai/issues/359>. |
9 |
| -
|
10 | 3 | Nightly releases are uploaded to
|
11 | 4 | https://github.com/nod-ai/shark-ai/releases/tag/dev-wheels.
|
12 | 5 |
|
@@ -51,11 +44,9 @@ which python3.11
|
51 | 44 | # /usr/bin/python3.11
|
52 | 45 | ```
|
53 | 46 |
|
54 |
| -> [!NOTE] |
55 |
| -> Tip: manage multiple Python versions using `pyenv` |
56 |
| -> (<https://github.com/pyenv/pyenv>), or `update-alternatives` on Linux |
57 |
| -> ([guide here](https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux)) |
58 |
| -> , or the |
| 47 | +> [!TIP] |
| 48 | +> Manage multiple Python versions using `pyenv` |
| 49 | +> (<https://github.com/pyenv/pyenv>), or the |
59 | 50 | > [Python Launcher for Windows](https://docs.python.org/3/using/windows.html#python-launcher-for-windows)
|
60 | 51 | > on Windows.
|
61 | 52 |
|
@@ -117,3 +108,106 @@ pip install -f https://iree.dev/pip-release-links.html --upgrade --pre \
|
117 | 108 | iree-base-compiler iree-base-runtime --src deps \
|
118 | 109 | -e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
|
119 | 110 | ```
|
| 111 | + |
| 112 | +## Switching between stable and nightly channels |
| 113 | + |
| 114 | +The [`shark-ai` package on PyPI](https://pypi.org/project/shark-ai/) is a |
| 115 | +meta-package that pins specific stable versions of each package that share |
| 116 | +at least their major and minor versions: |
| 117 | + |
| 118 | +```bash |
| 119 | +pip install shark-ai==2.9.1 |
| 120 | + |
| 121 | +pip freeze |
| 122 | +# ... |
| 123 | +# iree-base-compiler==2.9.0 |
| 124 | +# iree-base-runtime==2.9.0 |
| 125 | +# iree-turbine==2.9.0 |
| 126 | +# ... |
| 127 | +# shark-ai==2.9.1 |
| 128 | +# shortfin==2.9.1 |
| 129 | +# ... |
| 130 | +``` |
| 131 | + |
| 132 | +If you attempt to update any individual package outside of those supported |
| 133 | +versions, pip will log an error but continue anyway: |
| 134 | + |
| 135 | +```bash |
| 136 | +pip install --upgrade --pre \ |
| 137 | + -f https://github.com/nod-ai/shark-ai/releases/expanded_assets/dev-wheels \ |
| 138 | + shortfin==3.0.0rc20241118 |
| 139 | + |
| 140 | +# Looking in links: https://github.com/nod-ai/shark-ai/releases/expanded_assets/dev-wheels |
| 141 | +# Collecting shortfin==3.0.0rc20241118 |
| 142 | +# Downloading https://github.com/nod-ai/shark-ai/releases/download/dev-wheels/shortfin-3.0.0rc20241118-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB) |
| 143 | +# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 24.3 MB/s eta 0:00:00 |
| 144 | +# Installing collected packages: shortfin |
| 145 | +# Attempting uninstall: shortfin |
| 146 | +# Found existing installation: shortfin 2.9.1 |
| 147 | +# Uninstalling shortfin-2.9.1: |
| 148 | +# Successfully uninstalled shortfin-2.9.1 |
| 149 | +# ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. |
| 150 | +# shark-ai 2.9.1 requires shortfin==2.9.1, but you have shortfin 3.0.0rc20241118 which is incompatible. |
| 151 | +# Successfully installed shortfin-3.0.0rc20241118 |
| 152 | + |
| 153 | +pip freeze |
| 154 | +# ... |
| 155 | +# shark-ai==2.9.1 |
| 156 | +# shortfin==3.0.0rc20241118 |
| 157 | +# ... |
| 158 | +``` |
| 159 | + |
| 160 | +Installing the `shark-ai` package again should get back to aligned versions: |
| 161 | + |
| 162 | +```bash |
| 163 | +pip install shark-ai==2.9.1 |
| 164 | +# ... |
| 165 | +# Installing collected packages: shortfin |
| 166 | +# Attempting uninstall: shortfin |
| 167 | +# Found existing installation: shortfin 3.0.0rc20241118 |
| 168 | +# Uninstalling shortfin-3.0.0rc20241118: |
| 169 | +# Successfully uninstalled shortfin-3.0.0rc20241118 |
| 170 | +# Successfully installed shortfin-2.9.1 |
| 171 | + |
| 172 | +pip freeze |
| 173 | +# ... |
| 174 | +# shark-ai==2.9.1 |
| 175 | +# shortfin==2.9.1 |
| 176 | +# ... |
| 177 | +``` |
| 178 | + |
| 179 | +You can also uninstall the `shark-ai` package to bypass the error and take full |
| 180 | +control of package versions yourself: |
| 181 | + |
| 182 | +```bash |
| 183 | +pip uninstall shark-ai |
| 184 | + |
| 185 | +pip freeze |
| 186 | +# ... |
| 187 | +# (note: no shark-ai package) |
| 188 | +# shortfin==2.9.1 |
| 189 | +# ... |
| 190 | + |
| 191 | +pip install --upgrade --pre \ |
| 192 | + -f https://github.com/nod-ai/shark-ai/releases/expanded_assets/dev-wheels \ |
| 193 | + shortfin==3.0.0rc20241118 |
| 194 | + |
| 195 | +# Looking in links: https://github.com/nod-ai/shark-ai/releases/expanded_assets/dev-wheels |
| 196 | +# Collecting shortfin==3.0.0rc20241118 |
| 197 | +# Using cached https://github.com/nod-ai/shark-ai/releases/download/dev-wheels/shortfin-3.0.0rc20241118-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB) |
| 198 | +# Installing collected packages: shortfin |
| 199 | +# Attempting uninstall: shortfin |
| 200 | +# Found existing installation: shortfin 2.9.1 |
| 201 | +# Uninstalling shortfin-2.9.1: |
| 202 | +# Successfully uninstalled shortfin-2.9.1 |
| 203 | +# Successfully installed shortfin-3.0.0rc20241118 |
| 204 | + |
| 205 | +pip freeze |
| 206 | +# ... |
| 207 | +# (note: no shark-ai package) |
| 208 | +# shortfin==3.0.0rc20241118 |
| 209 | +# ... |
| 210 | +``` |
| 211 | + |
| 212 | +If you ever get stuck, consider creating a fresh |
| 213 | +[virtual environment](https://docs.python.org/3/library/venv.html). |
0 commit comments