From 3590e1be8388d7293a5a34cfc084c21f578c134a Mon Sep 17 00:00:00 2001 From: Shaojun Liu <61072813+liu-shaojun@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:37:10 +0800 Subject: [PATCH] revert python to 3.9 for finetune image (#10758) --- docker/llm/finetune/lora/cpu/docker/Dockerfile | 6 +++--- docker/llm/finetune/qlora/cpu/docker/Dockerfile | 2 +- docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s | 2 +- docker/llm/finetune/qlora/xpu/docker/Dockerfile | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/llm/finetune/lora/cpu/docker/Dockerfile b/docker/llm/finetune/lora/cpu/docker/Dockerfile index 8c564b03ea4..4b6f51b99e0 100644 --- a/docker/llm/finetune/lora/cpu/docker/Dockerfile +++ b/docker/llm/finetune/lora/cpu/docker/Dockerfile @@ -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 && \ # install pytorch 2.0.1 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 && \ export PIP_DEFAULT_TIMEOUT=100 && \ 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 && \ # install python add-apt-repository ppa:deadsnakes/ppa -y && \ - apt-get install -y python3.11 && \ + apt-get install -y python3.9 && \ 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 && \ pip install --no-cache requests argparse cryptography==3.3.2 urllib3 && \ pip install --upgrade requests && \ diff --git a/docker/llm/finetune/qlora/cpu/docker/Dockerfile b/docker/llm/finetune/qlora/cpu/docker/Dockerfile index 4f68d486061..2aaaa08e3f2 100644 --- a/docker/llm/finetune/qlora/cpu/docker/Dockerfile +++ b/docker/llm/finetune/qlora/cpu/docker/Dockerfile @@ -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 && \ # install pytorch 2.1.0 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 && \ rm -rf /var/lib/apt/lists/* && \ pip3 install --upgrade pip && \ diff --git a/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s b/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s index f14e0b08e5b..71a8a5e1720 100644 --- a/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s +++ b/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s @@ -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 && \ apt-get update && \ 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 && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p /var/run/sshd && \ diff --git a/docker/llm/finetune/qlora/xpu/docker/Dockerfile b/docker/llm/finetune/qlora/xpu/docker/Dockerfile index 478ed5bc2ce..ea5fe693782 100644 --- a/docker/llm/finetune/qlora/xpu/docker/Dockerfile +++ b/docker/llm/finetune/qlora/xpu/docker/Dockerfile @@ -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 && \ # 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 && \ - # install python 3.11 + # install python 3.9 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ env DEBIAN_FRONTEND=noninteractive apt-get update && \ add-apt-repository ppa:deadsnakes/ppa -y && \ - apt-get install -y python3.11 && \ + apt-get install -y python3.9 && \ 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 && \ - 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 && \ # install XPU ipex-llm pip install --pre --upgrade ipex-llm[xpu] --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ && \