Skip to content

Commit

Permalink
WIP docs updates, add cleans
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Oct 4, 2024
1 parent 7206738 commit c9a0499
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/) || 🚧 |
Expand Down
14 changes: 14 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ includes:
- publish: ./tasks/publish.yaml
- setup: ./tasks/setup.yaml
- deploy: ./tasks/deploy.yaml
- utils: ./tasks/utils.yaml

tasks:
#######
Expand All @@ -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
########
Expand Down
1 change: 1 addition & 0 deletions tasks/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions tasks/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
81 changes: 81 additions & 0 deletions tasks/utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion website/content/en/docs/local-deploy-guide/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/) || 🚧 |
Expand Down
4 changes: 2 additions & 2 deletions website/content/en/docs/local-deploy-guide/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c9a0499

Please sign in to comment.