yusufs commited on
Commit
6dcec5f
·
verified ·
1 Parent(s): 69dcd65

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -1
Dockerfile CHANGED
@@ -22,7 +22,28 @@ ENV VLLM_USE_TRITON_FLASH_ATTN=0
22
  # Choose XFORMERS that most stable for T4
23
  ENV VLLM_ATTENTION_BACKEND=XFORMERS
24
 
25
- RUN apt-get update && apt-get install -y python3 python3-pip git
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  RUN pip3 install --upgrade pip
27
 
28
  # Install vLLM
 
22
  # Choose XFORMERS that most stable for T4
23
  ENV VLLM_ATTENTION_BACKEND=XFORMERS
24
 
25
+ ARG PYTHON_VERSION=3.12
26
+
27
+ # The PyPA get-pip.py script is a self contained script+zip file, that provides
28
+ # both the installer script and the pip base85-encoded zip archive. This allows
29
+ # bootstrapping pip in environment where a dsitribution package does not exist.
30
+ #
31
+ # By parameterizing the URL for get-pip.py installation script, we allow
32
+ # third-party to use their own copy of the script stored in a private mirror.
33
+ # We set the default value to the PyPA owned get-pip.py script.
34
+ #
35
+ # Reference: https://pip.pypa.io/en/stable/installation/#get-pip-py
36
+ ARG GET_PIP_URL="https://bootstrap.pypa.io/get-pip.py"
37
+
38
+ RUN apt-get update -y \
39
+ && apt-get install -y git python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
40
+ && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
41
+ && update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} \
42
+ && ln -sf /usr/bin/python${PYTHON_VERSION}-config /usr/bin/python3-config \
43
+ && curl -sS ${GET_PIP_URL} | python${PYTHON_VERSION} \
44
+ && python3 --version && python3 -m pip --version
45
+
46
+ # RUN apt-get update && apt-get install -y python3 python3-pip git
47
  RUN pip3 install --upgrade pip
48
 
49
  # Install vLLM