revert python to 3.9 for finetune image (#10758)
This commit is contained in:
		
							parent
							
								
									a9a6b6b7af
								
							
						
					
					
						commit
						3590e1be83
					
				
					 4 changed files with 9 additions and 9 deletions
				
			
		| 
						 | 
					@ -21,7 +21,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] h
 | 
				
			||||||
RUN mkdir /ipex_llm/data && mkdir /ipex_llm/model && \
 | 
					RUN mkdir /ipex_llm/data && mkdir /ipex_llm/model && \
 | 
				
			||||||
# install pytorch 2.0.1
 | 
					# install pytorch 2.0.1
 | 
				
			||||||
    apt-get update && \
 | 
					    apt-get update && \
 | 
				
			||||||
    apt-get install -y python3-pip python3.11-dev python3-wheel git software-properties-common && \
 | 
					    apt-get install -y python3-pip python3.9-dev python3-wheel git software-properties-common && \
 | 
				
			||||||
    pip3 install --upgrade pip && \
 | 
					    pip3 install --upgrade pip && \
 | 
				
			||||||
    export PIP_DEFAULT_TIMEOUT=100 && \
 | 
					    export PIP_DEFAULT_TIMEOUT=100 && \
 | 
				
			||||||
    pip install --upgrade torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu && \
 | 
					    pip install --upgrade torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu && \
 | 
				
			||||||
| 
						 | 
					@ -37,9 +37,9 @@ RUN mkdir /ipex_llm/data && mkdir /ipex_llm/model && \
 | 
				
			||||||
    pip install -r /ipex_llm/requirements.txt && \
 | 
					    pip install -r /ipex_llm/requirements.txt && \
 | 
				
			||||||
# install python
 | 
					# install python
 | 
				
			||||||
    add-apt-repository ppa:deadsnakes/ppa -y && \
 | 
					    add-apt-repository ppa:deadsnakes/ppa -y && \
 | 
				
			||||||
    apt-get install -y python3.11 && \
 | 
					    apt-get install -y python3.9 && \
 | 
				
			||||||
    rm /usr/bin/python3 && \
 | 
					    rm /usr/bin/python3 && \
 | 
				
			||||||
    ln -s /usr/bin/python3.11 /usr/bin/python3 && \
 | 
					    ln -s /usr/bin/python3.9 /usr/bin/python3 && \
 | 
				
			||||||
    ln -s /usr/bin/python3 /usr/bin/python && \
 | 
					    ln -s /usr/bin/python3 /usr/bin/python && \
 | 
				
			||||||
    pip install --no-cache requests argparse cryptography==3.3.2 urllib3 && \
 | 
					    pip install --no-cache requests argparse cryptography==3.3.2 urllib3 && \
 | 
				
			||||||
    pip install --upgrade requests && \
 | 
					    pip install --upgrade requests && \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] h
 | 
				
			||||||
RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
 | 
					RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
 | 
				
			||||||
    # install pytorch 2.1.0
 | 
					    # install pytorch 2.1.0
 | 
				
			||||||
    apt-get update && \
 | 
					    apt-get update && \
 | 
				
			||||||
    apt-get install -y --no-install-recommends python3-pip python3.11-dev python3-wheel python3.11-distutils git software-properties-common && \
 | 
					    apt-get install -y --no-install-recommends python3-pip python3.9-dev python3-wheel python3.9-distutils git software-properties-common && \
 | 
				
			||||||
    apt-get clean && \
 | 
					    apt-get clean && \
 | 
				
			||||||
    rm -rf /var/lib/apt/lists/* && \
 | 
					    rm -rf /var/lib/apt/lists/* && \
 | 
				
			||||||
    pip3 install --upgrade pip && \
 | 
					    pip3 install --upgrade pip && \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] h
 | 
				
			||||||
RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
 | 
					RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
 | 
				
			||||||
    apt-get update && \
 | 
					    apt-get update && \
 | 
				
			||||||
    apt install -y --no-install-recommends openssh-server openssh-client libcap2-bin gnupg2 ca-certificates \ 
 | 
					    apt install -y --no-install-recommends openssh-server openssh-client libcap2-bin gnupg2 ca-certificates \ 
 | 
				
			||||||
    python3-pip python3.11-dev python3-wheel python3.11-distutils git software-properties-common && \
 | 
					    python3-pip python3.9-dev python3-wheel python3.9-distutils git software-properties-common && \
 | 
				
			||||||
    apt-get clean && \
 | 
					    apt-get clean && \
 | 
				
			||||||
    rm -rf /var/lib/apt/lists/* && \
 | 
					    rm -rf /var/lib/apt/lists/* && \
 | 
				
			||||||
    mkdir -p /var/run/sshd && \
 | 
					    mkdir -p /var/run/sshd && \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,15 +18,15 @@ RUN curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-P
 | 
				
			||||||
    apt-get install -y curl wget git gnupg gpg-agent software-properties-common libunwind8-dev vim less && \
 | 
					    apt-get install -y curl wget git gnupg gpg-agent software-properties-common libunwind8-dev vim less && \
 | 
				
			||||||
    # install Intel GPU driver
 | 
					    # install Intel GPU driver
 | 
				
			||||||
    apt-get install -y intel-opencl-icd intel-level-zero-gpu=1.3.26241.33-647~22.04 level-zero level-zero-dev --allow-downgrades && \
 | 
					    apt-get install -y intel-opencl-icd intel-level-zero-gpu=1.3.26241.33-647~22.04 level-zero level-zero-dev --allow-downgrades && \
 | 
				
			||||||
    # install python 3.11
 | 
					    # install python 3.9
 | 
				
			||||||
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
 | 
					    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
 | 
				
			||||||
    env DEBIAN_FRONTEND=noninteractive apt-get update && \
 | 
					    env DEBIAN_FRONTEND=noninteractive apt-get update && \
 | 
				
			||||||
    add-apt-repository ppa:deadsnakes/ppa -y && \
 | 
					    add-apt-repository ppa:deadsnakes/ppa -y && \
 | 
				
			||||||
    apt-get install -y python3.11 && \
 | 
					    apt-get install -y python3.9 && \
 | 
				
			||||||
    rm /usr/bin/python3 && \
 | 
					    rm /usr/bin/python3 && \
 | 
				
			||||||
    ln -s /usr/bin/python3.11 /usr/bin/python3 && \
 | 
					    ln -s /usr/bin/python3.9 /usr/bin/python3 && \
 | 
				
			||||||
    ln -s /usr/bin/python3 /usr/bin/python && \
 | 
					    ln -s /usr/bin/python3 /usr/bin/python && \
 | 
				
			||||||
    apt-get install -y python3-pip python3.11-dev python3-wheel python3.11-distutils && \
 | 
					    apt-get install -y python3-pip python3.9-dev python3-wheel python3.9-distutils && \
 | 
				
			||||||
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
 | 
					    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
 | 
				
			||||||
    # install XPU ipex-llm
 | 
					    # install XPU ipex-llm
 | 
				
			||||||
    pip install --pre --upgrade ipex-llm[xpu] --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ && \
 | 
					    pip install --pre --upgrade ipex-llm[xpu] --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ && \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue