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:
12
Dockerfile
12
Dockerfile
@@ -19,6 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
xfce4 xfce4-goodies dbus-x11 x11-utils xfonts-base \
|
||||
fonts-noto-cjk fonts-noto-cjk-extra fonts-nanum \
|
||||
ffmpeg tesseract-ocr \
|
||||
pulseaudio pulseaudio-utils \
|
||||
python3 python3-venv python3-pip \
|
||||
novnc websockify supervisor gettext-base \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -31,6 +32,17 @@ RUN wget -q -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-
|
||||
# --- bun (Discord bot runtime/package manager) ---
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
# --- Node.js + Gemini CLI (the GEMINI_AUTH=oauth real-time search path shells
|
||||
# out to `gemini`; it needs a real Node runtime, not bun). The account
|
||||
# login itself is provided at runtime via the mounted ~/.gemini (see
|
||||
# docker-compose.yml); here we only install the binary. ---
|
||||
ARG GEMINI_CLI_VERSION=0.46.0
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||
&& apt-get install -y --no-install-recommends nodejs \
|
||||
&& npm install -g "@google/gemini-cli@${GEMINI_CLI_VERSION}" \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& gemini --version
|
||||
|
||||
# --- Python brain/bridge deps (slim set) ---
|
||||
COPY bridge/requirements-bridge.txt /app/bridge/requirements-bridge.txt
|
||||
RUN python3 -m venv /opt/venv \
|
||||
|
||||
Reference in New Issue
Block a user