diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index e949927d2..a6d60880b 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -85,6 +85,8 @@ FROM $container_base WORKDIR /app RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ iputils-ping net-tools iproute2 dnsutils telnet \ curl wget telnet \ procps psmisc lsof \ diff --git a/llama_stack/templates/watsonx/build.yaml b/llama_stack/templates/watsonx/build.yaml index d9cbc399b..0b5d14b87 100644 --- a/llama_stack/templates/watsonx/build.yaml +++ b/llama_stack/templates/watsonx/build.yaml @@ -27,4 +27,4 @@ distribution_spec: - inline::code-interpreter - inline::rag-runtime - remote::model-context-protocol -image_type: venv +image_type: conda diff --git a/llama_stack/templates/watsonx/doc_template.md b/llama_stack/templates/watsonx/doc_template.md index a1c9ef413..b9bc0539a 100644 --- a/llama_stack/templates/watsonx/doc_template.md +++ b/llama_stack/templates/watsonx/doc_template.md @@ -42,7 +42,7 @@ Make sure you have access to a WatsonX API Key. You can get one by referring [wa ## Running Llama Stack with WatsonX -You can do this via Conda (build code) or Docker which has a pre-built image. +You can do this via Conda (build code), venv or Docker which has a pre-built image. ### Via Docker @@ -53,9 +53,13 @@ LLAMA_STACK_PORT=5001 docker run \ -it \ -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \ + -v ./run.yaml:/root/my-run.yaml \ llamastack/distribution-{{ name }} \ + --yaml-config /root/my-run.yaml \ --port $LLAMA_STACK_PORT \ - --env WATSONX_API_KEY=$WATSONX_API_KEY --env WATSONX_PROJECT_ID=$WATSONX_PROJECT_ID + --env WATSONX_API_KEY=$WATSONX_API_KEY \ + --env WATSONX_PROJECT_ID=$WATSONX_PROJECT_ID \ + --env WATSONX_BASE_URL=$WATSONX_BASE_URL ``` ### Via Conda @@ -64,5 +68,6 @@ docker run \ llama stack build --template watsonx --image-type conda llama stack run ./run.yaml \ --port $LLAMA_STACK_PORT \ - --env WATSONX_API_KEY=$WATSONX_API_KEY --env WATSONX_PROJECT_ID=$WATSONX_PROJECT_ID + --env WATSONX_API_KEY=$WATSONX_API_KEY \ + --env WATSONX_PROJECT_ID=$WATSONX_PROJECT_ID ``` diff --git a/llama_stack/templates/watsonx/run.yaml b/llama_stack/templates/watsonx/run.yaml index 541e61073..568837d6a 100644 --- a/llama_stack/templates/watsonx/run.yaml +++ b/llama_stack/templates/watsonx/run.yaml @@ -17,19 +17,6 @@ providers: config: url: ${env.WATSONX_BASE_URL:https://us-south.ml.cloud.ibm.com} api_key: ${env.WATSONX_API_KEY:} - project_id: ${env.WATSONX_PROJECT_ID:} - safety: - - provider_id: llama-guard - provider_type: inline::llama-guard - config: {} - agents: - - provider_id: meta-reference - provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/llamastack-watsonx}/agents_store.db vector_io: - provider_id: faiss provider_type: inline::faiss @@ -37,38 +24,49 @@ providers: kvstore: type: sqlite namespace: null - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/llamastack-watsonx}/faiss_store.db - datasetio: - - provider_id: huggingface - provider_type: remote::huggingface - config: {} - - provider_id: localfs - provider_type: inline::localfs - config: {} - scoring: - - provider_id: basic - provider_type: inline::basic - config: {} - eval: + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/watsonx}/faiss_store.db + agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: {} - post_training: - - provider_id: torchtune - provider_type: inline::torchtune - config: {} - tool_runtime: - - provider_id: rag-runtime - provider_type: inline::rag-runtime - config: {} + config: + persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/watsonx}/agents_store.db telemetry: - provider_id: meta-reference provider_type: inline::meta-reference config: service_name: ${env.OTEL_SERVICE_NAME:llama-stack} sinks: ${env.TELEMETRY_SINKS:console,sqlite} - sqlite_db_path: ${env.SQLITE_DB_PATH:~/.llama/distributions/llamastack-watsonx/trace_store.db} -metadata_store: null + sqlite_db_path: ${env.SQLITE_DB_PATH:~/.llama/distributions/watsonx/trace_store.db} + eval: + - provider_id: meta-reference + provider_type: inline::meta-reference + config: + kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/watsonx}/meta_reference_eval.db + datasetio: + - provider_id: localfs + provider_type: inline::localfs + config: + kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/watsonx}/localfs_datasetio.db + scoring: + - provider_id: basic + provider_type: inline::basic + config: {} + tool_runtime: + - provider_id: rag-runtime + provider_type: inline::rag-runtime + config: {} +metadata_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/watsonx}/registry.db models: - metadata: {} model_id: meta-llama/llama-3-3-70b-instruct