FROM docker.io/pytorch/pytorch:2.7.0-cuda12.6-cudnn9-runtime ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ WHISPER_CACHE_DIR=/srv/asr/models-cache \ ASR_BASE_DIR=/srv/asr WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg \ libsndfile1 \ curl \ supervisor \ python3-venv \ && rm -rf /var/lib/apt/lists/* COPY envs/ /build/envs/ # gateway venv — 경량, GPU 불필요 RUN python -m venv /opt/venvs/gateway && \ /opt/venvs/gateway/bin/pip install --upgrade pip && \ /opt/venvs/gateway/bin/pip install -r /build/envs/gateway.txt # faster-whisper venv — CTranslate2가 CUDA 직접 처리 RUN python -m venv /opt/venvs/faster_whisper && \ /opt/venvs/faster_whisper/bin/pip install --upgrade pip && \ /opt/venvs/faster_whisper/bin/pip install -r /build/envs/faster_whisper.txt # qwen3 venv — base image의 torch/CUDA 상속 RUN python -m venv --system-site-packages /opt/venvs/qwen3 && \ /opt/venvs/qwen3/bin/pip install --upgrade pip && \ /opt/venvs/qwen3/bin/pip install -r /build/envs/qwen3.txt COPY app/ /app/ RUN chmod +x /app/start.sh EXPOSE 8000 CMD ["/app/start.sh"]