@@ -260,7 +260,33 @@ Containerfile created successfully in /tmp/tmp.viA3a3Rdsg/ContainerfileFROM pyth
260
260
You can now edit ~/meta-llama/llama-stack/tmp/configs/ollama-run.yaml and run `llama stack run ~/meta-llama/llama-stack/tmp/configs/ollama-run.yaml`
261
261
```
262
262
263
- After this step is successful, you should be able to find the built container image and test it with ` llama stack run <path/to/run.yaml> ` .
263
+ After this step is successful, you should be able to find the built container image and test it with:
264
+ ```
265
+ # This docker command will run the Llama Stack server based on the image built before
266
+ # The following is a list of docker flags and their use in running the server:
267
+ # -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT: Maps the container port to the host port for accessing the server
268
+ # -v ~/.llama:/root/.llama: Mounts the local .llama directory to persist configurations and data
269
+ # -v <path/to/run.yaml>:/app/run.yaml: Mounts the run configuration file into the container
270
+ # --entrypoint python: Specifies the entry point to run Python directly
271
+ # localhost/distribution-ollama:dev: The name and tag of the container image to run
272
+ # -m llama_stack.distribution.server.server: The Python module to execute
273
+ # --config /app/run.yaml: Path to the configuration file inside the container
274
+ # --port $LLAMA_STACK_PORT: Port number for the server to listen on
275
+ # --env INFERENCE_MODEL=$INFERENCE_MODEL: Sets the model to use for inference
276
+ # --env OLLAMA_URL=http://host.docker.internal:11434: Configures the URL for the Ollama service
277
+
278
+ docker run -it \
279
+ -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \
280
+ -v ~/.llama:/root/.llama \
281
+ -v <path/to/run.yaml>:/app/run.yaml \
282
+ --entrypoint python \
283
+ localhost/distribution-ollama:dev \
284
+ -m llama_stack.distribution.server.server \
285
+ --config /app/run.yaml \
286
+ --port $LLAMA_STACK_PORT \
287
+ --env INFERENCE_MODEL=$INFERENCE_MODEL \
288
+ --env OLLAMA_URL=http://host.docker.internal:11434
289
+ ```
264
290
:::
265
291
266
292
::::
0 commit comments