Add managed Lab 3 browser terminal deployment

This commit is contained in:
c4ch3c4d3
2026-04-13 16:40:14 -06:00
parent 30b919c0b9
commit cbf6c3fad3
12 changed files with 361 additions and 2 deletions
Executable → Regular
+43 -1
View File
@@ -28,6 +28,44 @@ ensure_transformerlab_default_user() {
--last-name "${TRANSFORMERLAB_DEFAULT_USER_LAST_NAME:-}" >>"$STATE_DIR/logs/transformerlab_default_user.log" 2>&1 || true
}
check_wetty_prereqs() {
if ! id "$COURSEWARE_STUDENT_USERNAME" >/dev/null 2>&1; then
echo "Missing terminal user '$COURSEWARE_STUDENT_USERNAME'. Re-run ./labctl up after setting COURSEWARE_STUDENT_PASSWORD_HASH." >&2
exit 1
fi
if [ ! -x "$WETTY_BIN" ]; then
echo "Missing WeTTY binary at $WETTY_BIN. Re-run ./labctl up." >&2
exit 1
fi
if [ ! -f "$WIKI_RUNTIME_CONFIG_PATH" ]; then
echo "Missing wiki runtime config at $WIKI_RUNTIME_CONFIG_PATH. Re-run ./labctl up." >&2
exit 1
fi
if [ ! -d "$COURSEWARE_LAB3_DIR" ]; then
echo "Missing lab workspace at $COURSEWARE_LAB3_DIR. Re-run ./labctl up." >&2
exit 1
fi
if ! python3 - <<'PY'
import socket, sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
try:
sock.connect(("127.0.0.1", 22))
except OSError:
sys.exit(1)
finally:
sock.close()
PY
then
echo "Loopback sshd is not reachable on 127.0.0.1:22." >&2
exit 1
fi
}
resolve_targets() {
if [ $# -eq 0 ]; then
echo "No target specified." >&2
@@ -82,7 +120,7 @@ service_ready() {
promptfoo)
curl -fsS "$(service_url "$service")/health" >/dev/null 2>&1
;;
open-webui|chunkviz|embedding-atlas|unsloth|wiki)
open-webui|chunkviz|embedding-atlas|unsloth|wiki|wetty)
curl -fsS "$(service_url "$service")" >/dev/null 2>&1
;;
*)
@@ -176,6 +214,9 @@ start_one() {
--required-support "batched" >>"$STATE_DIR/logs/transformerlab_plugin_supports.log" 2>&1 || true
fi
;;
wetty)
check_wetty_prereqs
;;
*)
;;
esac
@@ -289,6 +330,7 @@ Unsloth Studio: $(service_url unsloth)
Promptfoo CLI: $PROMPTFOO_BIN
Promptfoo UI: $(service_url promptfoo)
Wiki: $(service_url wiki)
Lab 3 Terminal: $(service_url wetty)
Kiln app: ${KILN_LAUNCH_PATH:-not installed}
EOF
}