Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI - add back build wizard, configure with name instead of build.yaml #74

Merged
merged 17 commits into from
Sep 18, 2024

Conversation

yanxi0830
Copy link
Contributor

@yanxi0830 yanxi0830 commented Sep 18, 2024

✅ add back wizard for llama stack build

$ llama stack build
> Please enter an unique name for identifying your Llama Stack build distribution (e.g. my-local-stack): stack-1
> Please enter the image type you want your distribution to be built with (docker or conda): conda
Now, let's configure your Llama Stack distribution specs with API providers
> Please enter the API provider for the inference API: (default=meta-reference): meta-reference
> Please enter the API provider for the safety API: (default=meta-reference): meta-reference
> Please enter the API provider for the agents API: (default=meta-reference): meta-reference
> Please enter the API provider for the memory API: (default=meta-reference): meta-reference
> Please enter the API provider for the telemetry API: (default=meta-reference): meta-reference
> (Optional) Please enter a short description for your Llama Stack distribution:

✅ configure with conda to take name, save conda build.yaml inside $CONDA_ENVS

llama stack configure stack-1

> YAML configuration has been written to ~/.llama/builds/conda/my-stack-name-run.yaml. You can now run `llama stack run ~/.llama/builds/conda/my-stack-name-run.yaml`

✅ run with name only

llama stack run stack-1

✅ polish messages & readme

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 18, 2024
@yanxi0830 yanxi0830 changed the title CLI update CLI - add back build wizard, configure with name instead of build.yaml Sep 18, 2024
@@ -57,7 +58,7 @@ def _run_stack_build_command_from_build_config(
llama_stack_path / "configs/distributions" / build_config.image_type
)
else:
build_dir = DISTRIBS_BASE_DIR / build_config.image_type
build_dir = Path(os.getenv("CONDA_PREFIX")).parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to use the CONDA_PREFIX within the build_conda_env.sh script?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanxi0830 how does the current conda environment end up working?

@yanxi0830 yanxi0830 marked this pull request as ready for review September 18, 2024 17:52
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
@@ -57,7 +58,7 @@ def _run_stack_build_command_from_build_config(
llama_stack_path / "configs/distributions" / build_config.image_type
)
else:
build_dir = DISTRIBS_BASE_DIR / build_config.image_type
build_dir = Path(os.getenv("CONDA_PREFIX")).parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanxi0830 how does the current conda environment end up working?

llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Show resolved Hide resolved
llama_stack/distribution/datatypes.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Outdated Show resolved Hide resolved
llama_stack/cli/stack/build.py Show resolved Hide resolved
llama_stack/cli/stack/build.py Show resolved Hide resolved
llama_stack/cli/stack/configure.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ashwinb ashwinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets go!

@yanxi0830 yanxi0830 merged commit 6b21523 into main Sep 18, 2024
3 checks passed
@yanxi0830 yanxi0830 deleted the cli_update branch September 18, 2024 18:44
yanxi0830 added a commit that referenced this pull request Sep 18, 2024
#74)

* add back wizard for build

* conda build path move

* polish message

* run with name only

* prompt for build

* improve comments

* update msgs

* add new lines

* move build.yaml

* address comments

* validator for providers

* move imports

* Please enter -> enter

* comments, get started guide

* nits

* fix cprint import

* fix imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants