Files
javis_bot/.env.example
javis-bot 0dbc0300d7
Some checks failed
Release / semantic-release (push) Successful in 19s
tests / Unit tests (Linux, Python 3.11) (push) Successful in 9m54s
Release / build-linux (push) Failing after 7m14s
Release / build-windows (push) Has been cancelled
Release / build-macos (arm64, macos-latest) (push) Has been cancelled
Release / build-macos (x64, macos-15-intel) (push) Has been cancelled
Release / release-main (push) Has been cancelled
Release / release-develop (push) Has been cancelled
Enable GPU: LLM + Whisper on the RTX 5050, pick qwen3:8b
GPU acceleration is now on by default and verified end-to-end on the
Blackwell RTX 5050 (sm_120):

- Ollama offloads 100% to GPU (log: library=CUDA compute=12.0,
  BLACKWELL_NATIVE_FP4=1). compose passes GPU via CDI
  (devices: nvidia.com/gpu=all) to both ollama and javis.
- Whisper STT on GPU: faster-whisper>=1.1.0 + nvidia-cublas/cudnn cu12,
  LD_LIBRARY_PATH baked into the image. Verified float16 transcribe on
  sm_120; bridge auto-falls back to CPU when no GPU is present.
- Model: default chat model -> qwen3:8b (best 8GB-VRAM tool-calling,
  ~5GB Q4). Embed stays nomic-embed-text.
- README documents the host one-time setup (nvidia-container-toolkit +
  `nvidia-ctk cdi generate`) and GPU on/off.

Verified: image builds; GPU visible in both containers via compose;
ollama ps = 100% GPU; faster-whisper cuda OK + CPU fallback OK;
bridge /health 200.
2026-06-09 15:49:21 +09:00

81 lines
3.5 KiB
Plaintext

# ============================================================================
# Javis Bot — environment configuration
# Copy to `.env` and fill in. Never commit your real `.env`.
# ============================================================================
# ---------------------------------------------------------------------------
# Discord bot (normal bot account) — voice I/O + slash commands
# ---------------------------------------------------------------------------
# From https://discord.com/developers/applications → your app
DISCORD_BOT_TOKEN=
DISCORD_APP_ID=
# The (single) server this bot serves. Guild-scoped commands appear instantly.
DISCORD_GUILD_ID=
# ---------------------------------------------------------------------------
# Brain bridge (Python service in bridge/) — STT + reply engine + TTS
# ---------------------------------------------------------------------------
BRIDGE_URL=http://127.0.0.1:8765
BRIDGE_HOST=127.0.0.1
BRIDGE_PORT=8765
JARVIS_BRAIN_ENABLED=1
JARVIS_TTS_ENABLED=1
# faster-whisper device/compute. GPU by default (RTX 5050 / sm_120, verified).
# Falls back to CPU automatically if no GPU is passed to the container.
WHISPER_DEVICE=cuda
WHISPER_COMPUTE_TYPE=float16
# Optional explicit Piper voice model (.onnx). If empty, the jarvis default is used.
TTS_PIPER_MODEL_PATH=
# ---------------------------------------------------------------------------
# Jarvis brain (Ollama-backed). In Docker these populate the rendered
# config (docker/jarvis-config.template.json). See src/jarvis/config.py.
# ---------------------------------------------------------------------------
# In docker-compose this is overridden to http://ollama:11434 automatically.
OLLAMA_BASE_URL=http://127.0.0.1:11434
# qwen3:8b — best 8GB-VRAM pick: strongest tool-calling, ~5GB Q4, fits the RTX 5050.
OLLAMA_CHAT_MODEL=qwen3:8b
OLLAMA_EMBED_MODEL=nomic-embed-text
WHISPER_MODEL=small
# ---------------------------------------------------------------------------
# Docker desktop (VNC) — used only by the container image
# ---------------------------------------------------------------------------
# VNC viewer password (max 8 chars effective). Watch the screen at localhost:5901.
VNC_PASSWORD=javis123
# Auto-opened page in the in-container Chrome.
CHROME_START_URL=about:blank
# ---------------------------------------------------------------------------
# VNC screen broadcast
# selfbot = real live "Go Live" stream (needs a USER/burner token; ToS risk)
# novnc = share a noVNC browser link (safe, real-time, not native)
# screenshot = periodic screenshots to the channel (safe, low fps)
# none = disabled
# ---------------------------------------------------------------------------
STREAM_BACKEND=selfbot
# The VNC desktop runs on X display :1 (see docs/vnc-xfce-setup.md)
VNC_DISPLAY=:1
VNC_RESOLUTION=1920x1080
VNC_FRAMERATE=30
VNC_BITRATE_KBPS=4000
# --- selfbot backend ---
# A THROWAWAY/burner Discord user account token. NEVER your main account.
# Using a selfbot violates Discord ToS and can get the account banned.
DISCORD_SELFBOT_TOKEN=
# --- novnc backend ---
# e.g. http://192.168.10.9:6080/vnc.html (websockify --web=/usr/share/novnc 6080 localhost:5901)
NOVNC_URL=
# --- screenshot backend ---
SCREENSHOT_INTERVAL_SEC=5
# ---------------------------------------------------------------------------
# Voice behaviour
# ---------------------------------------------------------------------------
# Silence (ms) that marks the end of an utterance before sending to the brain.
VOICE_SILENCE_MS=800