Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ The stack also supports **semantic** (vector-similarity) caching via `vector_sto

## 5. Setup & Deployment Instructions

### Production Deployment User
For secure production deployments, the gateway services are configured to run under a dedicated, non-privileged (no sudo) service account:
- **User**: `boy`
- **Home Directory**: `/mnt/DATA/boy`
- **Security Profile**: Completely without sudo privileges (no administrative or `wheel` group privileges) to minimize container breakout risks.
- **Service Persistence**: Systemd user lingering is enabled (`loginctl enable-linger boy`) to allow the rootless services to start at boot and run persistently without active user sessions.
- **Access**: Configured for direct SSH administration via authorized public keys in `/mnt/DATA/boy/.ssh/authorized_keys`. An SSH host configuration has been added to `~/.ssh/config` so you can connect simply via `ssh boy` (and a shell shortcut alias `boy` has been added to `~/.bashrc` to quickly access the host shell).
- **Rootless Podman**: Fully configured with container subuids/subgids and a user-level Docker-compatible API socket (`podman.socket` listening at `/run/user/1002/podman/podman.sock`).
Comment thread
sourcery-ai[bot] marked this conversation as resolved.

### Prerequisites
1. **Llama-Server Active**: Verify that your local user-level GPU-accelerated server is active:
```bash
Expand Down
14 changes: 11 additions & 3 deletions router/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,8 @@ async def get_dashboard():
<script>
async function refreshDashboard() {{
try {{
const res = await fetch("/api/dashboard-stats");
const basePath = window.location.pathname.endsWith('/') ? '../' : './';
const res = await fetch(basePath + "api/dashboard-stats");
if (!res.ok) throw new Error(`HTTP error! status: ${{res.status}}`);
const data = await res.json();

Expand Down Expand Up @@ -3584,7 +3585,14 @@ async def get_dashboard():
}}

// Initialize on load and set periodic polling
window.addEventListener("DOMContentLoaded", refreshDashboard);
window.addEventListener("DOMContentLoaded", () => {{
const basePath = window.location.pathname.endsWith('/') ? '../' : './';
const visLink = document.getElementById("visualizer-link");
if (visLink) {{
visLink.href = basePath + "visualizer";
}}
refreshDashboard();
}});
setInterval(refreshDashboard, 3000);
</script>
</head>
Expand All @@ -3596,7 +3604,7 @@ async def get_dashboard():
</div>
<div class="dashboard-title">System Control Center</div>
<div style="margin-top:8px;font-size:12px;opacity:0.6;">
<a href="/visualizer" style="color:#818cf8;text-decoration:none;">📊 Dataset Visualizer</a>
<a id="visualizer-link" href="visualizer" style="color:#818cf8;text-decoration:none;">📊 Dataset Visualizer</a>
</div>
</header>

Expand Down
10 changes: 6 additions & 4 deletions router/static/visualizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ <h2>Select a prompt from the list</h2>
let currentFilter = 'all';
let selectedIdx = -1;

const apiBase = window.location.pathname.includes('/static/') ? '../' : './';

// Load data
async function init() {
try {
const resp = await fetch('/data/classified_dataset.json');
const resp = await fetch(apiBase + 'data/classified_dataset.json');
const raw = await resp.json();
dataset = raw.prompts || [];
// Extract global stats from combined dataset
Expand All @@ -127,7 +129,7 @@ <h2>Select a prompt from the list</h2>

// Load benchmark results if available
try {
const resp = await fetch('/data/benchmark_results.json');
const resp = await fetch(apiBase + 'data/benchmark_results.json');
benchmark = await resp.json();
// Map benchmark results to dataset by index
} catch(e) {
Expand All @@ -136,7 +138,7 @@ <h2>Select a prompt from the list</h2>

// Load annotations
try {
const resp = await fetch('/data/annotations.json');
const resp = await fetch(apiBase + 'data/annotations.json');
const serverAnn = await resp.json();
annotations = { ...serverAnn, ...annotations };
} catch(e) {
Expand Down Expand Up @@ -351,7 +353,7 @@ <h3>✎ Human Review</h3>
// Save to localStorage
localStorage.setItem('classifier-annotations', JSON.stringify(annotations));
// Auto-sync by posting to dashboard save endpoint
fetch('/dashboard/save-annotations', {
fetch(apiBase + 'dashboard/save-annotations', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(annotations),
Expand Down