kikocis/llama-stack public
Changesets · Branches · Tags · Compare
| Changeset | 5548ca09a32ab1740ecddf1b720f3aa9c3342a562055bd65844114708628ad96 |
|---|---|
| Author | Xi Yan <xiyan@meta.com> · 2024-09-18 15:40 -07:00 |
| Committer | Xi Yan <xiyan@meta.com> · 2024-09-18 15:40 -07:00 |
| Parents | 30e129e4a270 |
1 file changed
modified docs/getting_started.md +18 −6
| @@ -115,6 +115,8 @@ | ||
| 115 | 115 | |
| 116 | 116 | At the end of build command, we will generate `<name>-build.yaml` file storing the build configurations. |
| 117 | 117 | |
| 118 | +After this step is complete, a file named `<name>-build.yaml` will be generated and saved at the output file path specified at the end of the command. | |
| 119 | + | |
| 118 | 120 | #### Building from scratch |
| 119 | 121 | - For a new user, we could start off with running `llama stack build` which will allow you to a interactively enter wizard where you will be prompted to enter build configurations. |
| 120 | 122 | ``` |
| @@ -156,7 +158,11 @@ | ||
| 156 | 158 | ``` |
| 157 | 159 | |
| 158 | 160 | ``` |
| 159 | - | |
| 161 | +$ llama stack build --template local-tgi --name my-tgi-stack | |
| 162 | +... | |
| 163 | +... | |
| 164 | +Build spec configuration saved at /home/xiyan/.conda/envs/llamastack-my-tgi-stack/my-tgi-stack-build.yaml | |
| 165 | +You may now run `llama stack configure my-tgi-stack` or `llama stack configure /home/xiyan/.conda/envs/llamastack-my-tgi-stack/my-tgi-stack-build.yaml` | |
| 160 | 166 | ``` |
| 161 | 167 | |
| 162 | 168 | #### Building from config file |
| @@ -183,10 +189,15 @@ | ||
| 183 | 189 | llama stack build --config llama_stack/distribution/templates/local-ollama-build.yaml |
| 184 | 190 | ``` |
| 185 | 191 | |
| 186 | -After this step is complete, a file named `8b-instruct-build.yaml` will be generated and saved at `~/.llama/distributions/conda/8b-instruct-build.yaml`. | |
| 187 | - | |
| 188 | 192 | #### How to build distribution with Docker image |
| 189 | -To build a docker image, simply change the `image_type` to `docker` in our `<name>-build.yaml` file, and run `llama stack build <name>-build.yaml`. | |
| 193 | + | |
| 194 | +To build a docker image, you may start off from a template and use the `--image-type docker` flag to specify `docker` as the build image type. | |
| 195 | + | |
| 196 | +``` | |
| 197 | +llama stack build --template local --image-type docker --name docker-0 | |
| 198 | +``` | |
| 199 | + | |
| 200 | +Alternatively, you may use a config file and set `image_type` to `docker` in our `<name>-build.yaml` file, and run `llama stack build <name>-build.yaml`. The `<name>-build.yaml` will be of contents like: | |
| 190 | 201 | |
| 191 | 202 | ``` |
| 192 | 203 | name: local-docker-example |
| @@ -202,9 +213,9 @@ | ||
| 202 | 213 | image_type: docker |
| 203 | 214 | ``` |
| 204 | 215 | |
| 205 | -The following command allows you to build a Docker image with the name `docker-local` | |
| 216 | +The following command allows you to build a Docker image with the name `<name>` | |
| 206 | 217 | ``` |
| 207 | -llama stack build ./llama_stack/distribution/example_configs/docker/local-docker-example-build.yaml --name docker-local | |
| 218 | +llama stack build --config <name>-build.yaml | |
| 208 | 219 | |
| 209 | 220 | Dockerfile created successfully in /tmp/tmp.I0ifS2c46A/DockerfileFROM python:3.10-slim |
| 210 | 221 | WORKDIR /app |
| @@ -214,6 +225,7 @@ | ||
| 214 | 225 | Build spec configuration saved at /home/xiyan/.llama/distributions/docker/docker-local-build.yaml |
| 215 | 226 | ``` |
| 216 | 227 | |
| 228 | + | |
| 217 | 229 | ## Step 2. Configure |
| 218 | 230 | After our distribution is built (either in form of docker or conda environment), we will run the following command to |
| 219 | 231 | ``` |