[INFRA-AI-04] STT Gateway Containerization and Network Port Isolation for AI Components
Infrastructure / MLOps
NoteTask Brief
- Repository / Component:
ai_voice_stt_gateway. - Stack: Docker, Docker Compose, Ollama (Whisper).
- Task Type: DevOps / Infra.
- Status: Ready for Implementation
Task Description
It is necessary to isolate the execution environment of the voice gateway by packaging the application into a Docker container, configure network ports to prevent conflicts with the Vision gateway, and ensure the automatic pulling of Whisper model weights.
Step-by-Step Instructions
- Server Network Port Isolation: In the uvicorn launch configuration (
uvicorn.run) and the Dockerfile, hardcode the dedicated port11436to prevent overlapping with the receipt gateway (which runs on port11435). - Docker Image Build: Write a
Dockerfilebased onpython:3.10-slim. Configure it to copy the gateway source code and install core network dependencies and logging utilities viapip. - Orchestration within the Shared Compose Environment:
- Add the
ai-voice-gatewayservice to the shared Docker Compose configuration file. - Configure port mapping for
11436:11436. - Pass the Ollama core network host via the
OLLAMA_HOSTenvironment variable.
- Add the
- Seeding the Model: Add an initialization step to the automation scripts that triggers downloading the
whisper-basemodel weights into the local volume of the Ollama container during the initial sandbox deployment.