4c9ed3c24b
Complete rewrite from Python/FastAPI to Go/Gin: - Go backend: auth (API keys + bcrypt), llama.cpp subprocess manager, hot-swap multi-model, rate limiting, quota system, webhooks - Vue 3 SPA admin panel (src/) with Tailwind CSS - Deployment: Docker multi-stage, docker-compose, nginx, systemd - GORM/SQLite models: ApiKey, Model, UsageLog, Quota, Webhook - REST API: /api/v1/admin/* (keys, models, chat, usage, health) - Embedded frontend via go:embed (build output at web/dist/) Removed legacy Python artifacts (app/, tests/, pyproject.toml, etc.)
36 lines
724 B
Desktop File
36 lines
724 B
Desktop File
[Unit]
|
|
Description=llama-server instance %i
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=llamalink
|
|
WorkingDirectory=/opt/llamalink
|
|
ExecStart=/usr/local/bin/llama-server \
|
|
--model /opt/llamalink/models/%i.gguf \
|
|
--alias %i \
|
|
--host 127.0.0.1 \
|
|
--port 8080 \
|
|
--ctx-size 8192 \
|
|
--n-gpu-layers auto \
|
|
--parallel 4 \
|
|
--rope-scaling linear
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=llama-server-%i
|
|
|
|
Environment="CUDA_VISIBLE_DEVICES=0"
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadOnlyPaths=/opt/llamalink/models
|
|
ReadWritePaths=/opt/llamalink/data
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|