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

python3.12

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -9
Dockerfile CHANGED
@@ -35,19 +35,33 @@ ARG PYTHON_VERSION=3.12
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
50
- RUN pip3 install vllm==0.10.0 --extra-index-url https://download.pytorch.org/whl/cu113
51
 
52
  RUN useradd -m appuser
53
  USER appuser
 
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
+ # Set environment variables to avoid interactive prompts
39
+ ENV DEBIAN_FRONTEND=noninteractive
40
+
41
+ # Update the package list and install necessary dependencies
42
+ RUN apt-get update && \
43
+ apt-get install -y software-properties-common
44
+
45
+ # Add the 'deadsnakes' PPA to get Python 3.12
46
+ RUN add-apt-repository ppa:deadsnakes/ppa
47
+
48
+ # Update the package list again to include the new repository
49
+ RUN apt-get update
50
+
51
+ # Install Python 3.12, pip, and other necessary development tools
52
+ RUN apt-get install -y tzdata git python3.12 python3.12-venv python3.12-dev
53
+
54
+ # Create a symbolic link to make 'python' and 'pip' commands work
55
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \
56
+ update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
57
+
58
+ RUN python --version && python -m pip --version
59
 
60
  # RUN apt-get update && apt-get install -y python3 python3-pip git
61
+ # RUN pip install --upgrade pip
62
 
63
  # Install vLLM
64
+ RUN pip install vllm==0.10.0 --extra-index-url https://download.pytorch.org/whl/cu113
65
 
66
  RUN useradd -m appuser
67
  USER appuser