llama-stack-mirror/llama_stack/cli
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
..
model Add a verify-download command to llama CLI (#457) 2024-11-14 11:47:51 -08:00
scripts API Updates (#73) 2024-09-17 19:51:35 -07:00
stack Make run yaml optional so dockers can start with just --env (#492) 2024-11-20 13:11:40 -08:00
tests Rename all inline providers with an inline:: prefix (#423) 2024-11-11 22:19:16 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
download.py Added optional md5 validate command once download is completed (#486) 2024-11-19 17:42:43 -08:00
llama.py Add a verify-download command to llama CLI (#457) 2024-11-14 11:47:51 -08:00
subcommand.py API Updates (#73) 2024-09-17 19:51:35 -07:00
table.py API Updates (#73) 2024-09-17 19:51:35 -07:00
verify_download.py Add a verify-download command to llama CLI (#457) 2024-11-14 11:47:51 -08:00