Default to localhost for workstation install
- ConnectionPanel defaults host to localhost, blank username - Backend OLLAMA_URL defaults to localhost:11434 - Systemd service reads /etc/llm-trainer/env for overrides Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://192.168.2.47:11434")
|
||||
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://localhost:11434")
|
||||
|
||||
|
||||
# ──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Server, LogIn, LogOut, Key, Eye, EyeOff } from 'lucide-react'
|
||||
|
||||
export default function ConnectionPanel({ onConnect, setStatus }) {
|
||||
const [form, setForm] = useState({
|
||||
host: '192.168.2.47',
|
||||
username: 'tocmo0nlord',
|
||||
host: 'localhost',
|
||||
username: '',
|
||||
password: '',
|
||||
key_path: '',
|
||||
port: 22,
|
||||
|
||||
@@ -88,6 +88,7 @@ Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=append:/var/log/llm-trainer/backend.log
|
||||
StandardError=append:/var/log/llm-trainer/backend.log
|
||||
EnvironmentFile=-/etc/llm-trainer/env
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
[Install]
|
||||
@@ -137,6 +138,15 @@ fi
|
||||
chown -R llm-trainer:llm-trainer /opt/llm-trainer
|
||||
chown -R llm-trainer:llm-trainer /var/log/llm-trainer
|
||||
|
||||
# Write default env config (only on first install)
|
||||
if [ ! -f /etc/llm-trainer/env ]; then
|
||||
cat > /etc/llm-trainer/env <<'ENV'
|
||||
# LLM Trainer configuration
|
||||
# Override Ollama URL if it runs on a different host
|
||||
OLLAMA_URL=http://localhost:11434
|
||||
ENV
|
||||
fi
|
||||
|
||||
# Build Python venv and install deps
|
||||
echo "Installing Python dependencies..."
|
||||
python3 -m venv /opt/llm-trainer/venv
|
||||
|
||||
Reference in New Issue
Block a user