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"