This commit is contained in:
OpenCode
2026-04-23 14:48:06 -06:00
parent 30f80fe058
commit 78676ece59
5 changed files with 48 additions and 7 deletions
+17
View File
@@ -18,6 +18,7 @@ usage() {
Usage:
./labctl up
./labctl down
./labctl ollama_models
./labctl preflight
./labctl versions
./labctl assets lab2 [--refresh]
@@ -82,6 +83,7 @@ WARNING: THIS SCRIPT WILL CONFIGURE YOUR ENVIRONMENT WILL THE FOLLOWING SOFTWARE
- Unsloth Studio
- Kiln Desktop
- Course-specific support assets for lab 1, lab 2, and lab 4
- Pre-pulled Lab 2 Ollama models for Q2, Q4, and Q8 Gemma 4 E2B
- A pre-registered Lab 1 Ollama model (requires Ollama ${min_ollama}+)
IT IS RECOMMENDED TO RUN THIS IN AN ISLOATED ENVIRONMENT (Dedicated WSL, VM, etc.)
@@ -106,6 +108,7 @@ WARNING: THIS SCRIPT WILL CONFIGURE YOUR ENVIRONMENT WILL THE FOLLOWING SOFTWARE
- Unsloth Studio
- Kiln Desktop
- Course-specific support assets for lab 1, lab 2, and lab 4
- Pre-pulled Lab 2 Ollama models for Q2, Q4, and Q8 Gemma 4 E2B
- A pre-registered Lab 1 Ollama model (requires Ollama ${min_ollama}+)
IT IS RECOMMENDED TO RUN THIS IN AN ISLOATED ENVIRONMENT (Dedicated WSL, VM, etc.)
@@ -536,6 +539,17 @@ handle_assets_command() {
esac
}
refresh_ollama_models() {
if [ ! -f "$ROOT_DIR/state/runtime.env" ]; then
cat <<'EOF' >&2
Missing state/runtime.env. Run ./labctl up first so the managed Ollama service is configured before pulling models.
EOF
exit 1
fi
run_playbook up.yml --tags ollama_models
}
main() {
local cmd=${1:-}
shift || true
@@ -546,6 +560,9 @@ main() {
run_playbook up.yml
run_project_script "$ROOT_DIR/scripts/service_manager.sh" start all
;;
ollama_models)
refresh_ollama_models
;;
down)
run_project_script "$ROOT_DIR/scripts/service_manager.sh" stop all || true
run_playbook down.yml