[INFRA-AI-04] STT Gateway Containerization and Network Port Isolation for AI Components

Infrastructure / MLOps

Published

October 14, 2026

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

  1. Server Network Port Isolation: In the uvicorn launch configuration (uvicorn.run) and the Dockerfile, hardcode the dedicated port 11436 to prevent overlapping with the receipt gateway (which runs on port 11435).
  2. Docker Image Build: Write a Dockerfile based on python:3.10-slim. Configure it to copy the gateway source code and install core network dependencies and logging utilities via pip.
  3. Orchestration within the Shared Compose Environment:
    • Add the ai-voice-gateway service to the shared Docker Compose configuration file.
    • Configure port mapping for 11436:11436.
    • Pass the Ollama core network host via the OLLAMA_HOST environment variable.
  4. Seeding the Model: Add an initialization step to the automation scripts that triggers downloading the whisper-base model weights into the local volume of the Ollama container during the initial sandbox deployment.