Elffuss BraidHub

kikocis/llama-stack public

update getting started
Changeset5548ca09a32ab1740ecddf1b720f3aa9c3342a562055bd65844114708628ad96
AuthorXi Yan <xiyan@meta.com> · 2024-09-18 15:40 -07:00
CommitterXi Yan <xiyan@meta.com> · 2024-09-18 15:40 -07:00
Parents30e129e4a270

Browse the files at this changeset

1 file changed

modified docs/getting_started.md +18 −6
@@ -115,6 +115,8 @@
115115
116116 At the end of build command, we will generate `<name>-build.yaml` file storing the build configurations.
117117
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+
118120 #### Building from scratch
119121 - 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.
120122 ```
@@ -156,7 +158,11 @@
156158 ```
157159
158160 ```
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`
160166 ```
161167
162168 #### Building from config file
@@ -183,10 +189,15 @@
183189 llama stack build --config llama_stack/distribution/templates/local-ollama-build.yaml
184190 ```
185191
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-
188192 #### 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:
190201
191202 ```
192203 name: local-docker-example
@@ -202,9 +213,9 @@
202213 image_type: docker
203214 ```
204215
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>`
206217 ```
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
208219
209220 Dockerfile created successfully in /tmp/tmp.I0ifS2c46A/DockerfileFROM python:3.10-slim
210221 WORKDIR /app
@@ -214,6 +225,7 @@
214225 Build spec configuration saved at /home/xiyan/.llama/distributions/docker/docker-local-build.yaml
215226 ```
216227
228+
217229 ## Step 2. Configure
218230 After our distribution is built (either in form of docker or conda environment), we will run the following command to
219231 ```