Provision Netron and Lab 1 local assets
This commit is contained in:
+19
-11
@@ -15,15 +15,22 @@ load_runtime_env() {
|
||||
: "${COURSEWARE_STATE_DIR:=$STATE_DIR}"
|
||||
: "${COURSEWARE_BIND_HOST:=127.0.0.1}"
|
||||
: "${COURSEWARE_URL_HOST:=127.0.0.1}"
|
||||
: "${COURSEWARE_NETRON_PORT:=8338}"
|
||||
: "${COURSEWARE_PROMPTFOO_PORT:=15500}"
|
||||
: "${COURSEWARE_WIKI_PORT:=80}"
|
||||
: "${COURSEWARE_WETTY_PORT:=7681}"
|
||||
: "${COURSEWARE_OLLAMA_MIN_VERSION:=0.12.11}"
|
||||
: "${COURSEWARE_WETTY_BASE_PATH:=/wetty}"
|
||||
: "${NODE_RUNTIME_BIN_DIR:=$COURSEWARE_STATE_DIR/tools/node-runtime/node_modules/node/bin}"
|
||||
: "${NETRON_VENV:=$COURSEWARE_STATE_DIR/venvs/netron}"
|
||||
: "${WETTY_BIN:=$COURSEWARE_STATE_DIR/tools/wetty/node_modules/.bin/wetty}"
|
||||
: "${PROMPTFOO_DIR:=$COURSEWARE_STATE_DIR/lab6}"
|
||||
: "${WIKI_DIR:=$COURSEWARE_STATE_DIR/repos/LLM-Labs}"
|
||||
: "${WIKI_RUNTIME_CONFIG_PATH:=$WIKI_DIR/public/courseware-runtime.json}"
|
||||
: "${COURSEWARE_OLLAMA_BASE_URL:=http://$COURSEWARE_URL_HOST:$COURSEWARE_OLLAMA_PORT}"
|
||||
: "${COURSEWARE_LAB1_QWEN_MODEL_PATH:=$COURSEWARE_STATE_DIR/models/lab1/Qwen3-0.6B-Q8_0.gguf}"
|
||||
: "${COURSEWARE_LAB1_LLAMA_MODEL_PATH:=$COURSEWARE_STATE_DIR/models/lab1/Llama-3.2-1B.Q4_K_M.gguf}"
|
||||
: "${COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS:=lab1-qwen3-0.6b-q8_0}"
|
||||
: "${LLAMA_CPP_BIN_DIR:=$COURSEWARE_STATE_DIR/repos/llama.cpp/build/bin}"
|
||||
|
||||
if [ -n "${OLLAMA_BIN:-}" ] && [[ "$OLLAMA_BIN" != */* ]] && command -v "$OLLAMA_BIN" >/dev/null 2>&1; then
|
||||
@@ -42,7 +49,7 @@ service_list() {
|
||||
printf '%s\n' \
|
||||
"ollama" \
|
||||
"open-webui" \
|
||||
"transformerlab" \
|
||||
"netron" \
|
||||
"chunkviz" \
|
||||
"embedding-atlas" \
|
||||
"unsloth" \
|
||||
@@ -63,7 +70,7 @@ service_port() {
|
||||
case "$1" in
|
||||
ollama) printf '%s\n' "${COURSEWARE_OLLAMA_PORT}" ;;
|
||||
open-webui) printf '%s\n' "${COURSEWARE_OPEN_WEBUI_PORT}" ;;
|
||||
transformerlab) printf '%s\n' "${COURSEWARE_TRANSFORMERLAB_PORT}" ;;
|
||||
netron) printf '%s\n' "${COURSEWARE_NETRON_PORT}" ;;
|
||||
chunkviz) printf '%s\n' "${COURSEWARE_CHUNKVIZ_PORT}" ;;
|
||||
embedding-atlas) printf '%s\n' "${COURSEWARE_EMBEDDING_ATLAS_PORT}" ;;
|
||||
unsloth) printf '%s\n' "${COURSEWARE_UNSLOTH_PORT}" ;;
|
||||
@@ -78,7 +85,7 @@ service_url() {
|
||||
case "$1" in
|
||||
ollama) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_OLLAMA_PORT" ;;
|
||||
open-webui) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_OPEN_WEBUI_PORT" ;;
|
||||
transformerlab) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_TRANSFORMERLAB_PORT" ;;
|
||||
netron) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_NETRON_PORT" ;;
|
||||
chunkviz) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_CHUNKVIZ_PORT" ;;
|
||||
embedding-atlas) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_EMBEDDING_ATLAS_PORT" ;;
|
||||
unsloth) printf 'http://%s:%s\n' "$COURSEWARE_URL_HOST" "$COURSEWARE_UNSLOTH_PORT" ;;
|
||||
@@ -107,14 +114,11 @@ service_command() {
|
||||
"$COURSEWARE_BIND_HOST" \
|
||||
"$COURSEWARE_OPEN_WEBUI_PORT"
|
||||
;;
|
||||
transformerlab)
|
||||
printf 'export PATH="%s/envs/transformerlab/bin:$PATH"; export VIRTUAL_ENV="%s/envs/transformerlab"; export CONDA_PREFIX="%s/envs/transformerlab"; cd "%s/src" && exec ./run.sh -c -h %s -p %s' \
|
||||
"$TRANSFORMERLAB_DIR" \
|
||||
"$TRANSFORMERLAB_DIR" \
|
||||
"$TRANSFORMERLAB_DIR" \
|
||||
"$TRANSFORMERLAB_DIR" \
|
||||
netron)
|
||||
printf 'exec "%s/bin/netron" --host %s --port %s --verbosity quiet' \
|
||||
"$NETRON_VENV" \
|
||||
"$COURSEWARE_BIND_HOST" \
|
||||
"$COURSEWARE_TRANSFORMERLAB_PORT"
|
||||
"$COURSEWARE_NETRON_PORT"
|
||||
;;
|
||||
chunkviz)
|
||||
printf 'cd "%s" && PATH="%s:$PATH" exec "./node_modules/.bin/serve" build -s -n -L -l tcp://%s:%s' \
|
||||
@@ -145,9 +149,13 @@ service_command() {
|
||||
"$COURSEWARE_PROMPTFOO_PORT"
|
||||
;;
|
||||
wiki)
|
||||
printf 'cd "%s" && PATH="%s:$PATH" exec "./node_modules/.bin/next" start --hostname %s --port %s' \
|
||||
printf 'cd "%s" && PATH="%s:$PATH" exec env COURSEWARE_OLLAMA_BASE_URL="%s" COURSEWARE_LAB1_QWEN_MODEL_PATH="%s" COURSEWARE_LAB1_LLAMA_MODEL_PATH="%s" COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS="%s" "./node_modules/.bin/next" start --hostname %s --port %s' \
|
||||
"$WIKI_DIR" \
|
||||
"$NODE_RUNTIME_BIN_DIR" \
|
||||
"$COURSEWARE_OLLAMA_BASE_URL" \
|
||||
"$COURSEWARE_LAB1_QWEN_MODEL_PATH" \
|
||||
"$COURSEWARE_LAB1_LLAMA_MODEL_PATH" \
|
||||
"$COURSEWARE_LAB1_OLLAMA_MODEL_ALIAS" \
|
||||
"$COURSEWARE_BIND_HOST" \
|
||||
"$COURSEWARE_WIKI_PORT"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user