llama-stack/llama_stack/cli/stack
Ashwin Bharambe 681322731b
Make run yaml optional so dockers can start with just --env (#492)
When running with dockers, the idea is that users be able to work purely
with the `llama stack` CLI. They should not need to know about the
existence of any YAMLs unless they need to. This PR enables it.

The docker command now doesn't need to volume mount a yaml and can
simply be:
```bash
docker run -v ~/.llama/:/root/.llama \
  --env A=a --env B=b
```

## Test Plan

Check with conda first (no regressions):
```bash
LLAMA_STACK_DIR=. llama stack build --template ollama
llama stack run ollama --port 5001

# server starts up correctly
```

Check with docker
```bash
# build the docker
LLAMA_STACK_DIR=. llama stack build --template ollama --image-type docker

export INFERENCE_MODEL="meta-llama/Llama-3.2-3B-Instruct"

docker run -it  -p 5001:5001 \
  -v ~/.llama:/root/.llama \
  -v $PWD:/app/llama-stack-source \
  localhost/distribution-ollama:dev \
  --port 5001 \
  --env INFERENCE_MODEL=$INFERENCE_MODEL \
  --env OLLAMA_URL=http://host.docker.internal:11434
```

Note that volume mounting to `/app/llama-stack-source` is only needed
because we built the docker with uncommitted source code.
2024-11-20 13:11:40 -08:00
..
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
build.py fix llama stack build for together & llama stack build from templates (#479) 2024-11-18 22:29:16 -08:00
configure.py Fix build configure deprecation message (#456) 2024-11-14 09:56:03 -08:00
list_apis.py API Updates (#73) 2024-09-17 19:51:35 -07:00
list_providers.py provider_id => provider_type, adapter_id => adapter_type 2024-10-02 14:05:59 -07:00
run.py Make run yaml optional so dockers can start with just --env (#492) 2024-11-20 13:11:40 -08:00
stack.py API Updates (#73) 2024-09-17 19:51:35 -07:00