52 lines
1.7 KiB
Docker
52 lines
1.7 KiB
Docker
ARG ILUVATAR_BASE_IMAGE=registry.iluvatar.com.cn:10443/customer/sz/vllm0.17.0-4.4.0-x86:v5
|
|
FROM ${ILUVATAR_BASE_IMAGE}
|
|
|
|
ARG PYTHON_BIN=python3
|
|
ARG INSTALL_SYSTEM_PACKAGES=false
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
|
|
HF_HUB_DISABLE_PROGRESS_BARS=1 \
|
|
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
|
ACCELERATOR=iluvatar \
|
|
DEVICE=auto \
|
|
APP_PYTHON_BIN=${PYTHON_BIN}
|
|
|
|
# Iluvatar production images should be built on top of the official Iluvatar
|
|
# vLLM image. The base image owns the IX runtime, PyTorch, vLLM, and kernels;
|
|
# this layer only adds generic project/runtime dependencies and app code.
|
|
RUN if [ "${INSTALL_SYSTEM_PACKAGES}" = "true" ]; then \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip python3-venv ffmpeg sox libsox-dev libsndfile1 nginx \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*; \
|
|
fi
|
|
|
|
WORKDIR /app
|
|
|
|
COPY environments/iluvatar/requirements.txt /tmp/qwen3-asr-iluvatar-requirements.txt
|
|
RUN ${APP_PYTHON_BIN} -m pip install --no-cache-dir -r /tmp/qwen3-asr-iluvatar-requirements.txt && \
|
|
rm -f /tmp/qwen3-asr-iluvatar-requirements.txt
|
|
|
|
RUN ${APP_PYTHON_BIN} - <<'PY'
|
|
import importlib
|
|
import torch
|
|
|
|
print("torch", torch.__version__)
|
|
print("torch.cuda.is_available", torch.cuda.is_available())
|
|
for name in ("vllm",):
|
|
module = importlib.import_module(name)
|
|
print(name, getattr(module, "__version__", "unknown"))
|
|
PY
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /app/data/temp /app/data/logs /app/data/tasks \
|
|
&& chmod +x start.py /app/scripts/docker/entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/app/scripts/docker/entrypoint.sh"]
|
|
CMD ["python3", "start.py"]
|