Test llama stack list-deps #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test llama stack list-deps | |
| run-name: Test llama stack list-deps | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/llama_stack/cli/stack/list_deps.py' | |
| - 'src/llama_stack/cli/stack/_list_deps.py' | |
| - 'src/llama_stack/core/build.*' | |
| - 'src/llama_stack/core/*.sh' | |
| - '.github/workflows/providers-list-deps.yml' | |
| - 'src/llama_stack/templates/**' | |
| - 'pyproject.toml' | |
| pull_request: | |
| paths: | |
| - 'src/llama_stack/cli/stack/list_deps.py' | |
| - 'src/llama_stack/cli/stack/_list_deps.py' | |
| - 'src/llama_stack/core/build.*' | |
| - 'src/llama_stack/core/*.sh' | |
| - '.github/workflows/providers-list-deps.yml' | |
| - 'src/llama_stack/templates/**' | |
| - 'pyproject.toml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| distros: ${{ steps.set-matrix.outputs.distros }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Generate Distribution List | |
| id: set-matrix | |
| run: | | |
| distros=$(ls -d src/llama_stack/distributions/*/ 2>/dev/null | \ | |
| awk -F'/' '{print $(NF-1)}' | \ | |
| grep -v '^__pycache__$' | \ | |
| grep -v '^ci-tests$' | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "distros=$distros" >> "$GITHUB_OUTPUT" | |
| list-deps: | |
| needs: generate-matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| distro: ${{ fromJson(needs.generate-matrix.outputs.distros) }} | |
| image-type: [venv, container] | |
| fail-fast: false # We want to run all jobs even if some fail | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: Print dependencies | |
| run: | | |
| uv run llama stack list-deps ${{ matrix.distro }} | |
| - name: Install Distro using llama stack list-deps | |
| run: | | |
| # USE_COPY_NOT_MOUNT is set to true since mounting is not supported by docker buildx, we use COPY instead | |
| # LLAMA_STACK_DIR is set to the current directory so we are building from the source | |
| USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. uv run llama stack list-deps ${{ matrix.distro }} | xargs -L1 uv pip install | |
| - name: Print dependencies in the image | |
| if: matrix.image-type == 'venv' | |
| run: | | |
| uv pip list | |
| show-single-provider: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: Show a single provider | |
| run: | | |
| USE_COPY_NOT_MOUNT=true LLAMA_STACK_DIR=. uv run llama stack list-deps --providers inference=remote::ollama | |
| list-deps-from-config: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install dependencies | |
| uses: ./.github/actions/setup-runner | |
| - name: list-des from Config | |
| env: | |
| USE_COPY_NOT_MOUNT: "true" | |
| LLAMA_STACK_DIR: "." | |
| run: | | |
| uv run llama stack list-deps src/llama_stack/distributions/ci-tests/config.yaml |