[INFRA-AI-06] Text AI Parser Containerization and :11437 Port Isolation
Infrastructure / MLOps
NoteTask Brief
- Repository / Component:
ai_voice_text_parser. - Stack: Docker, Docker Compose, Ollama (Qwen).
- Task Type: DevOps / Infra.
- Status: Ready for Implementation
Task Description
It is necessary to package the Python text structuring service into a Docker container, configure its isolation from other AI components on port 11437, and automate the downloading of the lightweight LLM model weights for qwen2.5:3b.
Step-by-Step Instructions
- Network Port Isolation: In the launch file (
uvicorn.run) and the Dockerfile configuration, fix the port to11437so that the service can run concurrently with the receipt gateway (11435) and the STT gateway (11436). - Dockerfile Manifest Development: Define the container build based on
python:3.10-slim, configuring the installation offastapi,requests, andpydanticpackages. - Orchestration in Docker Compose: Add the
ai-voice-parserservice to the shared configuration file. Map ports11437:11437and link it to theollama-corecontainer using the sharedOLLAMA_HOSTenvironment variable. - Model Seeding Automation: Add an initialization step (
ollama run qwen2.5:3b) to the deployment script so that the model is automatically pulled into local volume storage upon the environment’s first launch.