fix(docker): in-container Gemini CLI OAuth, broadcast audio, ports + hardening
Makes the all-in-one image actually run the new real-time-search features and closes review gaps: - Gemini OAuth path: install Node 22 + @google/gemini-cli (pinned 0.46.0) in the image; mount a DEDICATED host dir (~/.config/javis/gemini) holding only the OAuth creds to /root/.gemini (not the whole ~/.gemini). Verified in-container: `gemini -p ... -o json` returns a grounded answer with no API key. - Broadcast audio: add PulseAudio + a headless null-sink (run-pulse.sh, new supervisor program); export XDG_RUNTIME_DIR/PULSE_SERVER so Chrome playback and the selfbot `ffmpeg -f pulse -i @DEFAULT_MONITOR@` share one daemon. Verified: default sink virtual_speaker, monitor present, ffmpeg capture OK. - Bind the brain bridge to 127.0.0.1 only (internal, unauthenticated API). - VNC host port is overridable; this server pins VNC_PORT=5902 (.env) since the host already runs Xvnc on 5901. Verified in-container with CDI GPU passthrough: RTX 5050 visible, NVENC encoders (h264/hevc/av1) available. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -69,14 +69,26 @@ services:
|
||||
shm_size: "1gb" # Chrome needs a larger /dev/shm
|
||||
ports:
|
||||
# Host ports are overridable. If the HOST already runs VNC on 5901
|
||||
# (see docs/vnc-xfce-setup.md), set VNC_PORT=5902 in .env.
|
||||
# (see docs/vnc-xfce-setup.md), set VNC_PORT=5902 in .env — this server
|
||||
# does, so .env pins VNC_PORT=5902.
|
||||
- "${VNC_PORT:-5901}:5901" # VNC
|
||||
- "${NOVNC_PORT:-6080}:6080" # noVNC (open in a browser)
|
||||
- "${BRIDGE_PORT:-8765}:8765" # brain bridge (usually internal-only)
|
||||
# Brain bridge: bind to loopback only — it is an internal bot<->brain API
|
||||
# with no auth and must not be reachable off-host.
|
||||
- "127.0.0.1:${BRIDGE_PORT:-8765}:8765"
|
||||
volumes:
|
||||
- javis_data:/data # jarvis db + memory
|
||||
- whisper_cache:/root/.cache/huggingface # cached Whisper models
|
||||
- piper_voices:/opt/piper-voices # TTS voices
|
||||
# Gemini account login for GEMINI_AUTH=oauth real-time search. Mounts a
|
||||
# DEDICATED dir holding only the Gemini OAuth creds (not the whole
|
||||
# ~/.gemini), so the container can refresh its token without exposing
|
||||
# unrelated host state. Seed it once with the host login:
|
||||
# mkdir -p ~/.config/javis/gemini
|
||||
# cp ~/.gemini/oauth_creds.json ~/.config/javis/gemini/
|
||||
# Override GEMINI_OAUTH_DIR to point elsewhere. Only used when
|
||||
# GEMINI_AUTH=oauth.
|
||||
- ${GEMINI_OAUTH_DIR:-${HOME}/.config/javis/gemini}:/root/.gemini
|
||||
|
||||
volumes:
|
||||
ollama_models:
|
||||
|
||||
Reference in New Issue
Block a user