Koaris commited on
Commit
dffc747
·
verified ·
1 Parent(s): cae0465

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -12
Dockerfile CHANGED
@@ -3,10 +3,11 @@ FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PATH="/root/.local/bin:$PATH"
5
 
6
- RUN echo "user:x:1000:1000::/home/user:/bin/bash" >> /etc/passwd
7
- RUN mkdir -p /home/user && chown 1000:1000 /home/user
 
8
 
9
- # System dependencies
10
  RUN apt-get update && apt-get install -y \
11
  python3.10 \
12
  python3.10-venv \
@@ -22,20 +23,18 @@ RUN apt-get update && apt-get install -y \
22
  RUN ln -sf /usr/bin/python3.10 /usr/bin/python && \
23
  ln -sf /usr/bin/pip3 /usr/bin/pip
24
 
25
- # Install uv and ensure it's available in this layer
26
  RUN curl -Ls https://astral.sh/uv/install.sh | bash && \
27
- /root/.local/bin/uv pip install --system 'vllm[audio]' --extra-index-url https://wheels.vllm.ai/nightly
28
 
29
-
30
-
31
- # Optional: install Hugging Face tools
32
  RUN pip install huggingface_hub
33
 
34
- # Preload model (optional, helps with cold start)
35
  RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('mistralai/Voxtral-Mini-3B-2507')"
36
 
37
- # Expose vLLM API server port
38
  EXPOSE 8000
39
 
40
- # Default command to run the server
41
- CMD ["vllm", "serve", "mistralai/Voxtral-Mini-3B-2507", "--tokenizer_mode mistral", "--config_format mistral", "--load_format mistral"]
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PATH="/root/.local/bin:$PATH"
5
 
6
+ # Fix for getpwuid() error when no user is present
7
+ RUN echo "user:x:1000:1000::/home/user:/bin/bash" >> /etc/passwd && \
8
+ mkdir -p /home/user && chown 1000:1000 /home/user
9
 
10
+ # Install dependencies
11
  RUN apt-get update && apt-get install -y \
12
  python3.10 \
13
  python3.10-venv \
 
23
  RUN ln -sf /usr/bin/python3.10 /usr/bin/python && \
24
  ln -sf /usr/bin/pip3 /usr/bin/pip
25
 
26
+ # Install uv and latest vllm[audio] from nightly index
27
  RUN curl -Ls https://astral.sh/uv/install.sh | bash && \
28
+ ~/.local/bin/uv pip install --system "vllm[audio]" --extra-index-url https://wheels.vllm.ai/nightly
29
 
30
+ # Install Hugging Face tools
 
 
31
  RUN pip install huggingface_hub
32
 
33
+ # Preload model weights (optional but recommended)
34
  RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('mistralai/Voxtral-Mini-3B-2507')"
35
 
36
+ # Expose the OpenAI-compatible API port
37
  EXPOSE 8000
38
 
39
+ # Final run command (corrected)
40
+ CMD ["vllm", "serve", "mistralai/Voxtral-Mini-3B-2507", "--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"]