Add wiki refresh command and service updates
This commit is contained in:
@@ -18,6 +18,7 @@ usage() {
|
||||
Usage:
|
||||
./labctl up
|
||||
./labctl down
|
||||
./labctl update_wiki
|
||||
./labctl ollama_models
|
||||
./labctl preflight
|
||||
./labctl versions
|
||||
@@ -83,7 +84,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
|
||||
- Pre-pulled Lab 2 Ollama models for Q4 and Q6 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.)
|
||||
@@ -108,7 +109,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
|
||||
- Pre-pulled Lab 2 Ollama models for Q4 and Q6 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.)
|
||||
@@ -524,6 +525,15 @@ require_arg() {
|
||||
fi
|
||||
}
|
||||
|
||||
require_managed_runtime() {
|
||||
if [ ! -f "$ROOT_DIR/state/runtime.env" ]; then
|
||||
cat <<'EOF' >&2
|
||||
Missing state/runtime.env. Run ./labctl up first so the managed environment exists before using this command.
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
handle_assets_command() {
|
||||
local asset_group=${1:-}
|
||||
shift || true
|
||||
@@ -540,16 +550,16 @@ handle_assets_command() {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
require_managed_runtime
|
||||
run_playbook up.yml --tags ollama_models
|
||||
}
|
||||
|
||||
update_wiki() {
|
||||
require_managed_runtime
|
||||
run_playbook up.yml --tags wiki -e "courseware_wiki_force_update=true"
|
||||
run_project_script "$ROOT_DIR/scripts/service_manager.sh" restart-wiki
|
||||
}
|
||||
|
||||
main() {
|
||||
local cmd=${1:-}
|
||||
shift || true
|
||||
@@ -563,6 +573,9 @@ main() {
|
||||
ollama_models)
|
||||
refresh_ollama_models
|
||||
;;
|
||||
update_wiki)
|
||||
update_wiki
|
||||
;;
|
||||
down)
|
||||
run_project_script "$ROOT_DIR/scripts/service_manager.sh" stop all || true
|
||||
run_playbook down.yml
|
||||
|
||||
Reference in New Issue
Block a user