Skip to content

Commit

Permalink
fix: update notebooks to avoid using the nutsy --image-name __system_…
Browse files Browse the repository at this point in the history
…_ thing (#1308)

The `--image-name __system__` thing was a hack and a bad one at that.
The actual intent was to somehow automatically detect the notebook
environment so we could avoid unnecessarily confusing things in the
llama stack build cmd-line. But I failed which led us to use the backup
`__system__` thing.

Let's just do the simple thing.

Note that `build_venv.sh` I haven't changed for now (so it still honors
the __system__ special name just that no new user should use it.)

## Test Plan

Open the notebooks from this branch in Colab (see example url below) and
ensure the builds work.


https://colab.research.google.com/github/meta-llama/llama-stack/blob/foo/docs/getting_started.ipynb

In the notebook, install llama-stack from this branch directly using:

```
!pip install -U https://github.com/meta-llama/llama-stack/archive/refs/heads/foo.zip
```

Verify that `!UV_SYSTEM_PYTHON=1 llama stack build --template together
--image-type venv` afterwards succeeds and the library client
initialization also works.
  • Loading branch information
ashwinb authored Feb 28, 2025
1 parent a34f3aa commit c541645
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 257 deletions.
8 changes: 3 additions & 5 deletions docs/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@
"outputs": [],
"source": [
"# NBVAL_SKIP\n",
"\n",
"!apt-get install -y bubblewrap\n",
"!pip install uv\n",
"!uv pip install llama-stack --system"
"!pip install -U llama-stack"
]
},
{
Expand Down Expand Up @@ -126,7 +124,7 @@
"source": [
"# NBVAL_SKIP\n",
"# This will build all the dependencies you will need\n",
"!llama stack build --template together --image-type venv --image-name __system__"
"!UV_SYSTEM_PYTHON=1 llama stack build --template together --image-type venv"
]
},
{
Expand Down Expand Up @@ -4328,7 +4326,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "master",
"display_name": "toolchain",
"language": "python",
"name": "python3"
},
Expand Down
Loading

0 comments on commit c541645

Please sign in to comment.