From 09f0c5f70b590a5433ea98c6e73385dc35e62841 Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Fri, 24 Jan 2025 11:07:58 -0800 Subject: [PATCH] update doc templates for running safety on self-hosted templates --- llama_stack/templates/ollama/doc_template.md | 6 +++++- llama_stack/templates/remote-vllm/doc_template.md | 7 ++++++- llama_stack/templates/tgi/doc_template.md | 7 ++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/llama_stack/templates/ollama/doc_template.md b/llama_stack/templates/ollama/doc_template.md index a75583592a..7c260e2c18 100644 --- a/llama_stack/templates/ollama/doc_template.md +++ b/llama_stack/templates/ollama/doc_template.md @@ -74,11 +74,15 @@ docker run \ If you are using Llama Stack Safety / Shield APIs, use: ```bash +# You need a local checkout of llama-stack to run this, get it using +# git clone https://github.com/meta-llama/llama-stack.git +cd /path/to/llama-stack + docker run \ -it \ -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \ -v ~/.llama:/root/.llama \ - -v ./run-with-safety.yaml:/root/my-run.yaml \ + -v ./llama_stack/templates/ollama/run-with-safety.yaml:/root/my-run.yaml \ llamastack/distribution-{{ name }} \ --yaml-config /root/my-run.yaml \ --port $LLAMA_STACK_PORT \ diff --git a/llama_stack/templates/remote-vllm/doc_template.md b/llama_stack/templates/remote-vllm/doc_template.md index 7f48f961ea..c855f6e62d 100644 --- a/llama_stack/templates/remote-vllm/doc_template.md +++ b/llama_stack/templates/remote-vllm/doc_template.md @@ -98,10 +98,15 @@ If you are using Llama Stack Safety / Shield APIs, use: export SAFETY_PORT=8081 export SAFETY_MODEL=meta-llama/Llama-Guard-3-1B +# You need a local checkout of llama-stack to run this, get it using +# git clone https://github.com/meta-llama/llama-stack.git +cd /path/to/llama-stack + docker run \ -it \ -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \ - -v ./run-with-safety.yaml:/root/my-run.yaml \ + -v ~/.llama:/root/.llama \ + -v ./llama_stack/templates/remote-vllm/run-with-safety.yaml:/root/my-run.yaml \ llamastack/distribution-{{ name }} \ --yaml-config /root/my-run.yaml \ --port $LLAMA_STACK_PORT \ diff --git a/llama_stack/templates/tgi/doc_template.md b/llama_stack/templates/tgi/doc_template.md index 067f69d1fe..18b7d6b86c 100644 --- a/llama_stack/templates/tgi/doc_template.md +++ b/llama_stack/templates/tgi/doc_template.md @@ -91,10 +91,15 @@ docker run \ If you are using Llama Stack Safety / Shield APIs, use: ```bash +# You need a local checkout of llama-stack to run this, get it using +# git clone https://github.com/meta-llama/llama-stack.git +cd /path/to/llama-stack + docker run \ -it \ -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \ - -v ./run-with-safety.yaml:/root/my-run.yaml \ + -v ~/.llama:/root/.llama \ + -v ./llama_stack/templates/tgi/run-with-safety.yaml:/root/my-run.yaml \ llamastack/distribution-{{ name }} \ --yaml-config /root/my-run.yaml \ --port $LLAMA_STACK_PORT \