llama-stack/llama_stack/distribution
Xi Yan 32d3abe964
[CICD] Github workflow for publishing Docker images (#764)
# What does this PR do?

- Add Github workflow for publishing docker images. 
- Manual Inputs
- We can use a (1) TestPyPi version / (2) build via released PyPi
version

**Notes**
- Keep this workflow manually triggered as we don't want to publish
nightly docker images

**Additional Changes**
- Resolve issue with running llama stack build in non-terminal device
```
  File "/home/runner/.local/lib/python3.12/site-packages/llama_stack/distribution/utils/exec.py", line 25, in run_with_pty
    old_settings = termios.tcgetattr(sys.stdin)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
termios.error: (25, 'Inappropriate ioctl for device')
```
- Modified build_container.sh to work in non-terminal environment


## Test Plan

- Triggered workflow:
3562217878
<img width="1076" alt="image"
src="https://github.com/user-attachments/assets/f1b5cef6-05ab-49c7-b405-53abc9264734"
/>


- Tested published docker image
<img width="702" alt="image"
src="https://github.com/user-attachments/assets/e7135189-65c8-45d8-86f9-9f3be70e380b"
/>


- /tools API endpoints are served so that docker is correctly using the
TestPyPi package
<img width="296" alt="image"
src="https://github.com/user-attachments/assets/bbcaa7fe-c0a4-4d22-b600-90e3c254bbfd"
/>

- Published tagged images:
https://hub.docker.com/repositories/llamastack
<img width="947" alt="image"
src="https://github.com/user-attachments/assets/2a0a0494-4d45-4643-bc29-72154ecc54a5"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-15 09:01:33 -08:00
..
routers remove conflicting default for tool prompt format in chat completion (#742) 2025-01-10 10:41:53 -08:00
server rename LLAMASTACK_PORT to LLAMA_STACK_PORT for consistency with other env vars (#744) 2025-01-10 11:09:49 -08:00
store Fix broken tests in test_registry (#707) 2025-01-14 14:33:15 -08:00
ui Convert SamplingParams.strategy to a union (#767) 2025-01-15 05:38:51 -08:00
utils [CICD] Github workflow for publishing Docker images (#764) 2025-01-15 09:01:33 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
build.py [CICD] Github workflow for publishing Docker images (#764) 2025-01-15 09:01:33 -08:00
build_conda_env.sh added support of PYPI_VERSION in stack build (#762) 2025-01-14 13:45:42 -08:00
build_container.sh [CICD] Github workflow for publishing Docker images (#764) 2025-01-15 09:01:33 -08:00
build_venv.sh Miscellaneous fixes around telemetry, library client and run yaml autogen 2024-12-08 20:40:22 -08:00
client.py use API version in "remote" stack client 2024-11-19 15:59:47 -08:00
common.sh API Updates (#73) 2024-09-17 19:51:35 -07:00
configure.py [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
configure_container.sh docker: Check for selinux before using --security-opt (#167) 2024-10-02 10:37:41 -07:00
datatypes.py agents to use tools api (#673) 2025-01-08 19:01:00 -08:00
distribution.py Tools API with brave and MCP providers (#639) 2024-12-19 21:25:17 -08:00
inspect.py add --version to llama stack CLI & /version endpoint (#732) 2025-01-08 16:30:06 -08:00
library_client.py [bugfix] fix streaming GeneratorExit exception with LlamaStackAsLibraryClient (#760) 2025-01-14 10:58:46 -08:00
request_headers.py Add X-LlamaStack-Client-Version, rename ProviderData -> Provider-Data (#735) 2025-01-09 11:51:36 -08:00
resolver.py agents to use tools api (#673) 2025-01-08 19:01:00 -08:00
stack.py llama-stack version alpha -> v1 2025-01-15 05:58:09 -08:00
start_conda_env.sh Move to use argparse, fix issues with multiple --env cmdline options 2024-11-18 16:31:59 -08:00
start_container.sh rename LLAMASTACK_PORT to LLAMA_STACK_PORT for consistency with other env vars (#744) 2025-01-10 11:09:49 -08:00