Nutanix AI distribution

This commit is contained in:
Jinan Zhou 2024-11-21 23:45:48 +00:00
parent f2ac4e2a94
commit cb82b1ee9e
10 changed files with 237 additions and 14 deletions

View file

@ -1,40 +0,0 @@
# Nutanix Distribution
The `llamastack/distribution-nutanix` distribution consists of the following provider configurations.
| **API** | **Inference** | **Agents** | **Memory** | **Safety** | **Telemetry** |
|----------------- |--------------- |---------------- |-------------------------------------------------- |---------------- |---------------- |
| **Provider(s)** | remote::nutanix | meta-reference | meta-reference | meta-reference | meta-reference |
### Start the Distribution (Hosted remote)
> [!NOTE]
> This assumes you have an hosted Nutanix AI endpoint and an API Key.
1. Clone the repo
```
git clone git@github.com:meta-llama/llama-stack.git
cd llama-stack
```
2. Config the model name
Please adjust the `NUTANIX_SUPPORTED_MODELS` variable at line 29 in `llama_stack/providers/adapters/inference/nutanix/nutanix.py` according to your deployment.
3. Build the distrbution
```
pip install -e .
llama stack build --template nutanix --name ntnx --image-type conda
```
4. Set the endpoint URL and API Key
```
llama stack configure ntnx
```
5. Serve and enjoy!
```
llama stack run ntnx --port 174
```

View file

@ -0,0 +1,15 @@
services:
llamastack:
image: distribution-nutanix
volumes:
- ~/.llama:/root/.llama
- ./run.yaml:/root/llamastack-run-nutanix.yaml
ports:
- "5000:5000"
entrypoint: bash -c "python -m llama_stack.distribution.server.server --yaml_config /root/llamastack-run-nutanix.yaml"
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s

View file

@ -0,0 +1,51 @@
version: '2'
image_name: nutanix
docker_image: null
conda_env: nutanix
apis:
- agents
- inference
- memory
- safety
- telemetry
providers:
inference:
- provider_id: nutanix
provider_type: remote::nutanix
config:
url: https://ai.nutanix.com/api/v1
api_key: ${env.NUTANIX_API_KEY}
memory:
- provider_id: faiss
provider_type: inline::faiss
config:
kvstore:
type: sqlite
namespace: null
db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/nutanix}/faiss_store.db
safety:
- provider_id: nutanix
provider_type: remote::nutanix
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/nutanix}/agents_store.db
telemetry:
- provider_id: meta-reference
provider_type: inline::meta-reference
config: {}
metadata_store:
namespace: null
type: sqlite
db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/nutanix}/registry.db
models: []
shields: []
memory_banks: []
datasets: []
scoring_fns: []
eval_tasks: []