File size: 1,600 Bytes
c7b0478 225a663 4425fa5 9b44107 dffc747 4425fa5 dffc747 225a663 c7b0478 4425fa5 c7b0478 4425fa5 c7b0478 225a663 4425fa5 dffc747 78be320 dffc747 bbfb10b dffc747 4425fa5 7773eb3 4460d6e dffc747 4425fa5 4460d6e dffc747 edd334d 4460d6e dffc747 edd334d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/root/.local/bin:$PATH"
# Fix for getpwuid() error when no user is present
RUN echo "user:x:1000:1000::/home/user:/bin/bash" >> /etc/passwd && \
mkdir -p /home/user && chown 1000:1000 /home/user
# Install dependencies
RUN apt-get update && apt-get install -y \
python3.10 \
python3.10-venv \
python3.10-distutils \
python3-pip \
curl \
git \
ffmpeg \
libsndfile1 \
&& apt-get clean
# Set python and pip aliases
RUN ln -sf /usr/bin/python3.10 /usr/bin/python && \
ln -sf /usr/bin/pip3 /usr/bin/pip
# Install uv and latest vllm[audio] from nightly index
RUN curl -Ls https://astral.sh/uv/install.sh | bash && \
~/.local/bin/uv pip install --system "vllm[audio]" --extra-index-url https://wheels.vllm.ai/nightly
# Install Hugging Face tools
RUN pip install huggingface_hub
COPY requirements.txt .
RUN pip install -r requirements.txt
# Preload model weights (optional but recommended)
RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('mistralai/Voxtral-Mini-3B-2507')"
# Expose the OpenAI-compatible API port
# Copy app.py
COPY app.py /app/app.py
WORKDIR /app
# Expose both ports
EXPOSE 8000 7860
# Final run command (corrected)
#CMD ["vllm", "serve", "mistralai/Voxtral-Mini-3B-2507", "--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"]
CMD bash -c "vllm serve mistralai/Voxtral-Mini-3B-2507 --tokenizer_mode mistral --config_format mistral --load_format mistral & python app.py"
|