fix: Dockerfile
Some checks failed
Build container / build-docker (push) Successful in 21m37s
Close and lock inactive threads / manage-inactive (push) Has been cancelled

This commit is contained in:
vera
2026-04-23 11:50:39 +08:00
parent a0c204b9ff
commit 482feaeabc
2 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,6 @@
FROM python:3.12-slim
RUN apt-get update && apt-get install -y build-essential ffmpeg && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y build-essential ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
@ -9,7 +9,20 @@ COPY . .
RUN uv sync
RUN uv sync --extra vllm
ENV PYTHONUNBUFFERED=1
ENV HF_HOME="/app/.cache/huggingface"
ENV ASR_MODEL_PATH="Qwen/Qwen3-ASR-1.7B"
ENV GPU_MEMORY_UTILIZATION=0.8
ENV MAX_NEW_TOKENS=32
ENV UNFIXED_CHUNK_NUM=4
ENV UNFIXED_TOKEN_NUM=5
ENV CHUNK_SIZE_SEC=1.0
EXPOSE 5000
CMD ["sh", "-c", "uv run examples/api_unified_fastapi.py --asr-model-path $ASR_MODEL_PATH"]
CMD ["sh", "-c", "uv run examples/api_unified_fastapi.py \
--asr-model-path $ASR_MODEL_PATH \
--gpu-memory-utilization $GPU_MEMORY_UTILIZATION \
--max-new-tokens $MAX_NEW_TOKENS \
--unfixed-chunk-num $UNFIXED_CHUNK_NUM \
--unfixed-token-num $UNFIXED_TOKEN_NUM \
--chunk-size-sec $CHUNK_SIZE_SEC"]