- Add Open WebUI scripts (06-09) for server-hosted ChatGPT-like interface connected to the vLLM backend on port 7081 - Add context window management to chat (auto-trim, token counter, progress bar) - Add terminal output panel to file editor for running Python/LaTeX files - Update README with Open WebUI setup, architecture diagram, and troubleshooting - Update STUDENT_GUIDE with step-by-step Open WebUI login instructions Made-with: Cursor
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ------------------------------------------------------------------
|
|
# 06_setup_openwebui.sh
|
|
# Pulls the Open WebUI container image and creates the data directory
|
|
# for persistent storage (user accounts, chat history, settings).
|
|
#
|
|
# Usage:
|
|
# bash 06_setup_openwebui.sh
|
|
# ------------------------------------------------------------------
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
SIF_FILE="${SCRIPT_DIR}/open-webui.sif"
|
|
DATA_DIR="${SCRIPT_DIR}/openwebui-data"
|
|
|
|
if [ -f "$SIF_FILE" ]; then
|
|
echo "Open WebUI container already exists at ${SIF_FILE}"
|
|
echo "Delete it first if you want to rebuild:"
|
|
echo " rm ${SIF_FILE}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "=== Pulling Open WebUI container image ==="
|
|
echo " Source: ghcr.io/open-webui/open-webui:main"
|
|
echo " This may take 5-10 minutes (~4 GB)..."
|
|
echo ""
|
|
|
|
apptainer pull "$SIF_FILE" docker://ghcr.io/open-webui/open-webui:main
|
|
|
|
mkdir -p "$DATA_DIR"
|
|
|
|
echo ""
|
|
echo "=== Setup complete ==="
|
|
echo "Image: ${SIF_FILE} ($(du -sh "$SIF_FILE" | cut -f1))"
|
|
echo "Data dir: ${DATA_DIR}"
|
|
echo ""
|
|
echo "Next: bash 07_start_openwebui.sh"
|