-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae242c4
commit 59c405e
Showing
793 changed files
with
1,102 additions
and
56,801 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Build FarmVibes.AI cluster | ||
run-name: Cluster build and helloworld test | ||
on: [push, pull_request, workflow_dispatch] | ||
env: | ||
FARMVIBES_AI_SKIP_DOCKER_FREE_SPACE_CHECK: yes | ||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free space before cleanup | ||
shell: bash | ||
run: | | ||
echo "Memory and swap:" | ||
free -h | ||
echo | ||
echo "Available storage:" | ||
df -h | ||
echo | ||
- name: Remove unused software | ||
shell: bash | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -fr /usr/local/lib/android | ||
sudo rm -fr /opt/ghc | ||
- name: Free space after cleanup | ||
shell: bash | ||
run: | | ||
echo "Memory and swap:" | ||
free -h | ||
echo | ||
echo "Available storage:" | ||
df -h | ||
echo | ||
- name: Update pip version | ||
shell: bash | ||
run: pip install --upgrade pip | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python requirements | ||
shell: bash | ||
run: pip install --user ./src/vibe_core | ||
|
||
- name: Actually build cluster | ||
shell: bash | ||
run: farmvibes-ai local setup | ||
|
||
- name: Cluster status | ||
shell: bash | ||
run: | | ||
echo "Deployments:" | ||
kubectl get deployments | ||
kubectl describe deployments | ||
echo "Pods:" | ||
kubectl get pods | ||
echo "Events:" | ||
kubectl get events | ||
- name: Free space after cluster creation | ||
shell: bash | ||
run: | | ||
echo "Memory and swap:" | ||
free -h | ||
echo | ||
echo "Available storage:" | ||
df -h | ||
echo | ||
- name: Run Hello World workflow | ||
shell: bash | ||
run: python -m vibe_core.farmvibes_ai_hello_world 300 | ||
|
||
- name: Install tool to view helloworld output | ||
shell: bash | ||
run: yes | sudo apt install caca-utils || echo | ||
|
||
- name: Show helloworld output | ||
shell: bash | ||
run: find ~/.cache/farmvibes-ai/data -type f -name '*.tif' -exec img2txt {} \; 2> /dev/null | ||
|
||
- name: Restart cluster | ||
shell: bash | ||
run: farmvibes-ai local restart | ||
|
||
- name: Wait a bit before submitting a new run (as documented) | ||
shell: bash | ||
run: sleep 90 | ||
|
||
- name: Run Hello World workflow again | ||
shell: bash | ||
run: | | ||
rm -fr ~/.cache/farmvibes-ai/data/{assets,stac} | ||
python -m vibe_core.farmvibes_ai_hello_world 300 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.