Update Dockerfile
Browse files- Dockerfile +25 -10
Dockerfile
CHANGED
|
@@ -1,21 +1,36 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Set environment variables
|
| 5 |
ENV HF_HUB_ENABLE_HF_TRANSFER=1
|
| 6 |
ENV TRANSFORMERS_CACHE=/data/.cache/huggingface/transformers
|
| 7 |
-
ENV HF_HOME=/tmp/hf-home
|
| 8 |
-
ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
|
| 9 |
-
ENV USER=user
|
| 10 |
-
ENV HOME=/tmp
|
| 11 |
-
|
| 12 |
-
# Install additional dependencies if needed
|
| 13 |
-
RUN pip install hf_transfer
|
| 14 |
|
| 15 |
# Expose port
|
| 16 |
EXPOSE 8000
|
| 17 |
|
| 18 |
-
# Serve
|
| 19 |
CMD ["vllm", "serve", "mistralai/Voxtral-Mini-3B-2507", \
|
| 20 |
"--tokenizer-mode", "mistral", \
|
| 21 |
"--config-format", "mistral", \
|
|
|
|
| 1 |
+
# Base image with CUDA 12.1 and Ubuntu 20.04
|
| 2 |
+
FROM nvidia/cuda:12.1.1-runtime-ubuntu20.04
|
| 3 |
+
ENV PIP_NO_CACHE_DIR=1
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
+
ENV TZ=Etc/UTC
|
| 6 |
+
ENV TRANSFORMERS_CACHE=/tmp/hf-cache
|
| 7 |
+
ENV HF_HOME=/tmp/hf-home
|
| 8 |
+
ENV HF_HUB_CACHE=/tmp/hf-cache
|
| 9 |
+
|
| 10 |
+
# Install system dependencies
|
| 11 |
+
RUN apt-get update && apt-get install -y \
|
| 12 |
+
git python3 python3-pip ffmpeg libsndfile1 tzdata && \
|
| 13 |
+
rm -rf /var/lib/apt/lists/*
|
| 14 |
+
|
| 15 |
+
# Install Python and upgrade pip and setuptools
|
| 16 |
+
RUN ln -s /usr/bin/python3 /usr/bin/python && \
|
| 17 |
+
pip3 install --upgrade pip && \
|
| 18 |
+
pip3 install --upgrade setuptools wheel
|
| 19 |
+
|
| 20 |
+
# Install required dependencies
|
| 21 |
+
RUN pip install tokenizers==0.19.1 hf_transfer
|
| 22 |
+
|
| 23 |
+
# Install vLLM with audio support from nightly wheels (this should work better)
|
| 24 |
+
RUN pip install -U "vllm[audio]" --extra-index-url https://wheels.vllm.ai/nightly
|
| 25 |
|
| 26 |
# Set environment variables
|
| 27 |
ENV HF_HUB_ENABLE_HF_TRANSFER=1
|
| 28 |
ENV TRANSFORMERS_CACHE=/data/.cache/huggingface/transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# Expose port
|
| 31 |
EXPOSE 8000
|
| 32 |
|
| 33 |
+
# Serve with updated parameters
|
| 34 |
CMD ["vllm", "serve", "mistralai/Voxtral-Mini-3B-2507", \
|
| 35 |
"--tokenizer-mode", "mistral", \
|
| 36 |
"--config-format", "mistral", \
|