diff --git a/README.md b/README.md index 2429da763..65974c479 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ leapfrogai/ ├── bundles/ │ ├── dev/ # uds bundles for local uds dev deployments │ └── latest/ # uds bundles for the most current uds deployments +├── tasks/ # uds task sub-modules (e.g., create, deploy, setup, etc.) +├── task.yaml # uds tasks for declarative, local development and CI, workflows ├── Makefile ├── pyproject.toml ├── README.md @@ -136,7 +138,7 @@ Below is the current component flavors list: | Component | `upstream` | `registry1` | | ---------------------------------------------- | ------------ | ------------- | | [api](packages/api/) | ✅ | ✅ | -| [ui](packages/ui/) | ✅ | 🚧 | +| [ui](packages/ui/) | ✅ | ✅ | | [supabase](packages/supabase/) | ✅ | 🚧 | | [migrations](./Dockerfile.migrations) | ✅ | 🚧 | | [llama-cpp-python](packages/llama-cpp-python/) | ✅ | 🚧 | diff --git a/tasks.yaml b/tasks.yaml index 9d952f0f5..5faa1c037 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -38,6 +38,7 @@ includes: - publish: ./tasks/publish.yaml - setup: ./tasks/setup.yaml - deploy: ./tasks/deploy.yaml + - utils: ./tasks/utils.yaml tasks: ####### @@ -49,6 +50,19 @@ tasks: - task: setup:check-python - task: setup:python-dependencies + ####### + # UTILS + ####### + - name: clean-all + description: "Cleans all artifact, cached, env, log, and model files" + actions: + - task: utils:clean-artifacts + - task: utils:clean-cache + - task: utils:clean-env + - task: utils:clean-logs + - task: utils:clean-models + - task: utils:clean-ui + ######## # CREATE ######## diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml index 0b651889b..39ef8d166 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yaml @@ -115,6 +115,7 @@ tasks: - task: package with: path: "packages/vllm" + zarfConfig: "packages/vllm/zarf-config.yaml" - name: llama-cpp-python description: "Deploy the LLaMA-CPP-Python Zarf package" diff --git a/tasks/setup.yaml b/tasks/setup.yaml index a3a645dd0..2120fae79 100644 --- a/tasks/setup.yaml +++ b/tasks/setup.yaml @@ -14,14 +14,15 @@ tasks: actions: - task: setup-common:create-doug-user + ######### + # CLUSTER + ######### + - name: k3d-cpu-cluster-slim description: "Creates a UDS K3d cluster with slim UDS Core and CPU-only Capability" actions: - task: setup-common:k3d-test-cluster - ######### - # CLUSTER - ######### - name: k3d-gpu-cluster-slim description: "Creates a UDS K3d cluster with slim UDS Core and NVIDIA GPU Capability" actions: diff --git a/tasks/utils.yaml b/tasks/utils.yaml index 91fa73ddb..dbdba115e 100644 --- a/tasks/utils.yaml +++ b/tasks/utils.yaml @@ -71,3 +71,84 @@ tasks: if [[ ${FLAVOR} = "upstream" || ${{ .inputs.override }} = "true" ]]; then docker push ${{ .inputs.tag }} ${{ .inputs.options }} fi + + ######### + # CLEANUP + ######### + - name: clean-artifacts + actions: + - description: "Clean artifacts" + shell: + linux: bash + darwin: bash + cmd: | + rm -f zarf-package-*.tar.zst + rm -f packages/**/zarf-package-*.tar.zst + rm -rf build + rm -rf src/**/build + rm -rf packages/**/build + find . -name 'uds-bundle-*-*.tar.zst' -delete + find . -type d -name 'zarf-sbom' -exec rm -rf {} + + find . -name '*.whl' -delete + find . -type d -name '*.egg-info' -exec rm -rf {} + + mute: true + + - name: clean-ui + actions: + - description: "Clean UI artifacts" + shell: + linux: bash + darwin: bash + cmd: | + rm -rf src/leapfrogai_ui/playwright + rm -rf src/leapfrogai_ui/.svelte-kit + rm -rf src/leapfrogai_ui/node_modules + rm -rf src/leapfrogai_ui/test-results + rm -f src/leapfrogai_ui/.env + rm -rf src/leapfrogai_ui/e2e-report + mute: true + + - name: clean-cache + actions: + - description: "Clean cache" + shell: + linux: bash + darwin: bash + cmd: | + rm -rf ./**/__pycache__ ./**/*/__pycache__ ./**/**/*/__pycache__ + rm -rf ./.ruff_cache ./**/*/.ruff_cache ./**/.ruff_cache + rm -rf ./.pytest_cache ./**/.pytest_cache ./**/*/.pytest_cache + rm -rf ./.mypy_cache + mute: true + + - name: clean-env + actions: + - description: "Clean env files" + shell: + linux: bash + darwin: bash + cmd: | + rm -f .env + rm -f .env.email + rm -f .env.password + mute: true + + - name: clean-logs + actions: + - description: "Clean log files" + shell: + linux: bash + darwin: bash + cmd: | + rm -rf ./.logs + mute: true + + - name: clean-models + actions: + - description: "Clean model files" + shell: + linux: bash + darwin: bash + cmd: | + rm -rf ./packages/**/.model + mute: true diff --git a/website/content/en/docs/local-deploy-guide/components.md b/website/content/en/docs/local-deploy-guide/components.md index f062994f0..b384d1404 100644 --- a/website/content/en/docs/local-deploy-guide/components.md +++ b/website/content/en/docs/local-deploy-guide/components.md @@ -33,7 +33,7 @@ Below is the current component flavors list: | Component | `upstream` | `registry1` | | ---------------------------------------------- | ------------ | ------------- | | [api](packages/api/) | ✅ | ✅ | -| [ui](packages/ui/) | ✅ | 🚧 | +| [ui](packages/ui/) | ✅ | ✅ | | [supabase](packages/supabase/) | ✅ | 🚧 | | [migrations](./Dockerfile.migrations) | ✅ | 🚧 | | [llama-cpp-python](packages/llama-cpp-python/) | ✅ | 🚧 | diff --git a/website/content/en/docs/local-deploy-guide/quick_start.md b/website/content/en/docs/local-deploy-guide/quick_start.md index 95f04fda7..05c8f06fa 100644 --- a/website/content/en/docs/local-deploy-guide/quick_start.md +++ b/website/content/en/docs/local-deploy-guide/quick_start.md @@ -61,9 +61,9 @@ If you already have a pre-built UDS bundle, please skip to [Deploying the UDS Bu 1. Deploy a UDS Kubernetes cluster with **ONE** of the following: ```bash - make create-uds-cpu-cluster # if you have CPUs only + uds run setup:k3d-cpu-cluster-slim # if you have CPUs only # OR - make create-uds-gpu-cluster # if you have GPUs (macOS not supported) + uds run setup:k3d-gpu-cluster-slim # if you have GPUs (macOS not supported) ``` 2. Deploy the bundle you created in the [previous steps](#building-the-uds-bundle):