Files
miku-discord/bot/Dockerfile
koko210Serve 9d2c14fa0b Fix vision pipeline: ffmpeg removal by autoremove, increase vision timeout, reduce frame count, add Discord activity awareness
- bot/Dockerfile: Add ffmpeg to reinstall line after apt-get autoremove
  (autoremove was sweeping up ffmpeg as 'no longer needed' after playwright install)
- bot/utils/image_handling.py: Increase video analysis timeout 120s→300s, 6→3 for Tenor GIFs (GTX 1660 VRAM constraint)
- bot/utils/activities.py: Add _activity_changed_at timestamp tracking,
  get_current_activity_label() and get_current_activity_fresh() with 30-min decay
- bot/utils/cat_client.py: Pass current Discord activity to Cheshire Cat pipeline
- bot/utils/llm.py: Inject current Discord activity into system prompt
- cat-plugins/*: Forward Discord activity through working_memory to personality plugins
- bot/persona/*/preamble.txt: Add Discord status usage guidelines for character prompts
- llama-swap-rocm-config.yaml: Add qwen3.5 model entry for ComfyUI prompt generation
- AGENTS.md: New project documentation file
2026-05-27 01:18:12 +03:00

73 lines
2.1 KiB
Docker

FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt && pip cache purge
# Install system dependencies
# ffmpeg: video/audio processing for media handling
# libgl1: OpenGL library required by opencv-contrib-python
# libglib2.0-0: GLib library (common dependency)
RUN apt-get update && apt-get install -y \
ffmpeg \
libgl1 \
libglib2.0-0 \
ca-certificates \
curl \
gnupg \
lsb-release \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc
# Install Playwright browsers with system dependencies (for UNO automation)
RUN playwright install --with-deps chromium
# Remove unused system packages to reduce image size
# Note: Playwright installs many dependencies; we remove what we can safely
RUN apt-get remove -y \
pocketsphinx-en-us \
pocketsphinx \
libflite1 \
libpocketsphinx3 \
mesa-vulkan-drivers \
mesa-va-drivers \
mesa-vdpau-drivers \
libvulkan1 \
|| true && \
apt-get autoremove -y && \
apt-get install -y libgl1 libglib2.0-0 ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Docker CLI and docker compose plugin so the bot can build/create the face detector container
RUN set -eux; \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
> /etc/apt/sources.list.d/docker.list; \
apt-get update; \
apt-get install -y docker-ce-cli docker-compose-plugin; \
apt-get clean; rm -rf /var/lib/apt/lists/*
COPY bot.py .
COPY server_manager.py .
COPY command_router.py .
COPY config.py .
COPY config_manager.py .
COPY utils /app/utils
COPY commands /app/commands
COPY memory /app/memory
COPY static /app/static
COPY globals.py .
COPY api.py .
COPY routes /app/routes
COPY api_main.py .
COPY persona /app/persona
COPY MikuMikuBeam.mp4 .
COPY Miku_BasicWorkflow.json .
COPY moods /app/moods/
COPY activities.yaml .
CMD ["python", "-u", "bot.py"]