Commit Graph

7 Commits

Author SHA1 Message Date
9972edb06d fix(docker): add config_manager.py to Dockerfile and logger components
- Add COPY config_manager.py to Dockerfile so it's included in the image
- Add 'config_manager' to logger COMPONENTS list to enable logging

Fixes the ModuleNotFoundError and ValueError when importing config_manager
2026-02-19 11:02:58 +02:00
cf55b15745 Optimize miku-bot container: remove unused packages and caches
Optimizations applied:
- Add pip cache purge after pip install (~7.5MB saved)
- Remove /usr/share/doc documentation (~7.5MB saved)
- Remove pocketsphinx speech recognition packages (~37MB saved)
- Remove libflite1 TTS library (~28MB saved)

Packages removed:
- pocketsphinx-en-us (US English speech model)
- pocketsphinx (speech recognition library)
- libflite1 (text-to-speech engine)
- libpocketsphinx3 (speech recognition frontend)

Reason: These packages are not used in Python code:
- Speech recognition: Handled by external stt-realtime container
- Text-to-speech: Handled by external RVC container

Note: Could not remove Vulkan/Mesa drivers (~130MB) because:
- Playwright installs them via --with-deps flag
- Removing them also removes libgl1 (required by OpenCV)
- libgl1 pulls back Mesa graphics drivers

Total savings: ~80MB (from previous 2.41GB baseline)
Container size remains 2.41GB due to essential package dependencies
2026-02-15 22:21:30 +02:00
0a9145728e Ability to play Uno implemented in early stages! 2026-01-30 21:43:20 +02:00
353c9c9583 Face Detector container now able to be created, started and stopped from within miku-bot container 2026-01-11 02:01:41 +02:00
1fc3d74a5b Add dual GPU support with web UI selector
Features:
- Built custom ROCm container for AMD RX 6800 GPU
- Added GPU selection toggle in web UI (NVIDIA/AMD)
- Unified model names across both GPUs for seamless switching
- Vision model always uses NVIDIA GPU (optimal performance)
- Text models (llama3.1, darkidol) can use either GPU
- Added /gpu-status and /gpu-select API endpoints
- Implemented GPU state persistence in memory/gpu_state.json

Technical details:
- Multi-stage Dockerfile.llamaswap-rocm with ROCm 6.2.4
- llama.cpp compiled with GGML_HIP=ON for gfx1030 (RX 6800)
- Proper GPU permissions without root (groups 187/989)
- AMD container on port 8091, NVIDIA on port 8090
- Updated bot/utils/llm.py with get_current_gpu_url() and get_vision_gpu_url()
- Modified bot/utils/image_handling.py to always use NVIDIA for vision
- Enhanced web UI with GPU selector button (blue=NVIDIA, red=AMD)

Files modified:
- docker-compose.yml (added llama-swap-amd service)
- bot/globals.py (added LLAMA_AMD_URL)
- bot/api.py (added GPU selection endpoints and helper function)
- bot/utils/llm.py (GPU routing for text models)
- bot/utils/image_handling.py (GPU routing for vision models)
- bot/static/index.html (GPU selector UI)
- llama-swap-rocm-config.yaml (unified model names)

New files:
- Dockerfile.llamaswap-rocm
- bot/memory/gpu_state.json
- bot/utils/gpu_router.py (load balancing utility)
- setup-dual-gpu.sh (setup verification script)
- DUAL_GPU_*.md (documentation files)
2026-01-09 00:03:59 +02:00
6ec33bcecb Implement Evil Miku mode with persistence, fix API event loop issues, and improve formatting
- Added Evil Miku mode with 4 evil moods (aggressive, cunning, sarcastic, evil_neutral)
- Created evil mode content files (evil_miku_lore.txt, evil_miku_prompt.txt, evil_miku_lyrics.txt)
- Implemented persistent evil mode state across restarts (saves to memory/evil_mode_state.json)
- Fixed API endpoints to use client.loop.create_task() to prevent timeout errors
- Added evil mode toggle in web UI with red theme styling
- Modified mood rotation to handle evil mode
- Configured DarkIdol uncensored model for evil mode text generation
- Reduced system prompt redundancy by removing duplicate content
- Added markdown escape for single asterisks (actions) while preserving bold formatting
- Evil mode now persists username, pfp, and nicknames across restarts without re-applying changes
2026-01-02 17:11:58 +02:00
8c74ad5260 Initial commit: Miku Discord Bot 2025-12-07 17:15:09 +02:00