diff --git a/.github/workflows/manually_build.yml b/.github/workflows/manually_build.yml index 1cbff6bc..24757b19 100644 --- a/.github/workflows/manually_build.yml +++ b/.github/workflows/manually_build.yml @@ -16,7 +16,7 @@ on: - ipex-llm-serving-cpu - ipex-llm-serving-xpu - ipex-llm-finetune-lora-cpu - - ipex-llm-finetune-qlora-cpu-standalone + - ipex-llm-finetune-qlora-cpu - ipex-llm-finetune-qlora-cpu-k8s - ipex-llm-finetune-xpu tag: @@ -74,8 +74,8 @@ jobs: sudo docker push ${image}:latest sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest - ipex-llm-finetune-qlora-cpu-standalone: - if: ${{ inputs.artifact == 'ipex-llm-finetune-qlora-cpu-standalone' || inputs.artifact == 'all' }} + ipex-llm-finetune-qlora-cpu: + if: ${{ inputs.artifact == 'ipex-llm-finetune-qlora-cpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -83,12 +83,12 @@ jobs: - name: docker login run: | docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} - - name: ipex-llm-finetune-qlora-cpu-standalone + - name: ipex-llm-finetune-qlora-cpu run: | echo "##############################################################" - echo "####### ipex-llm-finetune-qlora-cpu-standalone ########" + echo "####### ipex-llm-finetune-qlora-cpu ########" echo "##############################################################" - export image=intelanalytics/ipex-llm-finetune-qlora-cpu-standalone + export image=intelanalytics/ipex-llm-finetune-qlora-cpu cd docker/llm/finetune/qlora/cpu/docker sudo docker build \ --no-cache=true \ @@ -286,7 +286,7 @@ jobs: ipex-llm-serving-cpu: if: ${{ inputs.artifact == 'ipex-llm-serving-cpu' || inputs.artifact == 'all' }} - runs-on: [self-hosted, Shire] + runs-on: [self-hosted, Shire, AVX512] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 - name: docker login diff --git a/.github/workflows/manually_build_for_testing.yml b/.github/workflows/manually_build_for_testing.yml index acf966a8..c1477821 100644 --- a/.github/workflows/manually_build_for_testing.yml +++ b/.github/workflows/manually_build_for_testing.yml @@ -14,14 +14,15 @@ on: type: choice options: - all - - ipex-llm-finetune-lora-cpu - - ipex-llm-finetune-qlora-cpu - - ipex-llm-finetune-xpu + - ipex-llm-cpu - ipex-llm-xpu - ipex-llm-inference-cpp-xpu - - ipex-llm-cpu - - ipex-llm-serving-xpu - ipex-llm-serving-cpu + - ipex-llm-serving-xpu + - ipex-llm-finetune-lora-cpu + - ipex-llm-finetune-qlora-cpu + - ipex-llm-finetune-qlora-cpu-k8s + - ipex-llm-finetune-xpu tag: description: 'docker image tag (e.g. test)' required: true @@ -91,6 +92,32 @@ jobs: sudo docker push 10.239.45.10/arda/${image}:${TAG} sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + ipex-llm-finetune-qlora-cpu-k8s: + if: ${{ inputs.artifact == 'ipex-llm-finetune-qlora-cpu-k8s' || inputs.artifact == 'all' }} + runs-on: [self-hosted, Shire] + + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 + - name: docker login + run: | + docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} + - name: ipex-llm-finetune-qlora-cpu-k8s + run: | + echo "##############################################################" + echo "####### ipex-llm-finetune-qlora-cpu-k8s ########" + echo "##############################################################" + export image=intelanalytics/ipex-llm-finetune-qlora-cpu-k8s + cd docker/llm/finetune/qlora/cpu/docker + sudo docker build \ + --no-cache=true \ + --build-arg http_proxy=${HTTP_PROXY} \ + --build-arg https_proxy=${HTTPS_PROXY} \ + --build-arg no_proxy=${NO_PROXY} \ + -t ${image}:${TAG} -f ./Dockerfile.k8s . + sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + sudo docker push 10.239.45.10/arda/${image}:${TAG} + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + ipex-llm-finetune-xpu: if: ${{ github.event.inputs.artifact == 'ipex-llm-finetune-xpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] @@ -233,7 +260,7 @@ jobs: ipex-llm-serving-cpu: if: ${{ github.event.inputs.artifact == 'ipex-llm-serving-cpu' || github.event.inputs.artifact == 'all' }} - runs-on: [self-hosted, Shire] + runs-on: [self-hosted, Shire, AVX512] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 338c160e..3d667443 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -57,34 +57,9 @@ jobs: ## linux ## bash python/llm/dev/release_default_linux.sh ${nb_version} true - - name: Create Job Badge - if: ${{ always() }} - uses: ./.github/actions/create-job-status-badge - with: - secret: ${{ secrets.GIST_SECRET }} - gist-id: ${{env.GIST_ID}} - is-self-hosted-runner: true - file-name: nb-python-build.json - type: job - job-name: python-build - runner-hosted-on: 'Shanghai' - docker-build: if: ${{ github.event.schedule }} uses: ./.github/workflows/manually_build.yml with: artifact: all tag: 2.1.0-SNAPSHOT - - create-workflow-badge: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 - - name: create workflow badge - if: ${{ always() }} - uses: ./.github/actions/create-job-status-badge - with: - secret: ${{ secrets.GIST_SECRET }} - gist-id: ${{env.GIST_ID}} - file-name: nightly-build.json - type: workflow \ No newline at end of file diff --git a/docker/llm/finetune/lora/cpu/docker/Dockerfile b/docker/llm/finetune/lora/cpu/docker/Dockerfile index 4c77f40b..84d22b96 100644 --- a/docker/llm/finetune/lora/cpu/docker/Dockerfile +++ b/docker/llm/finetune/lora/cpu/docker/Dockerfile @@ -20,7 +20,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 python 3.11.1 - apt-get update && apt-get install -y curl wget gpg gpg-agent git gcc g++ make libunwind8-dev zlib1g-dev libssl-dev libffi-dev && \ + apt-get update && apt-get install -y curl wget gpg gpg-agent git gcc g++ make libunwind8-dev zlib1g-dev libssl-dev libffi-dev xz-utils && \ mkdir -p /opt/python && \ cd /opt/python && \ wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz && \ @@ -28,7 +28,6 @@ RUN mkdir /ipex_llm/data && mkdir /ipex_llm/model && \ cd Python-3.11.1 && \ ./configure --enable-optimizations --with-zlib && \ make altinstall && \ - rm /usr/bin/python3 && \ # Create a symbolic link pointing to Python 3.11 at /usr/bin/python3 ln -s /opt/python/Python-3.11.1/python /usr/bin/python3 && \ # Create a symbolic link pointing to /usr/bin/python3 at /usr/bin/python diff --git a/docker/llm/finetune/qlora/cpu/docker/Dockerfile b/docker/llm/finetune/qlora/cpu/docker/Dockerfile index b7181dcb..c828d237 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 python 3.11.1 apt-get update && \ - apt-get install -y curl wget gpg gpg-agent git gcc g++ make libunwind8-dev libbz2-dev zlib1g-dev libssl-dev libffi-dev && \ + apt-get install -y curl wget gpg gpg-agent git gcc g++ make libunwind8-dev libbz2-dev zlib1g-dev libssl-dev libffi-dev xz-utils && \ mkdir -p /opt/python && \ cd /opt/python && \ wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz && \ @@ -29,7 +29,6 @@ RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \ cd Python-3.11.1 && \ ./configure --enable-optimizations --with-zlib && \ make altinstall && \ - rm /usr/bin/python3 && \ # Create a symbolic link pointing to Python 3.11 at /usr/bin/python3 ln -s /opt/python/Python-3.11.1/python /usr/bin/python3 && \ # Create a symbolic link pointing to /usr/bin/python3 at /usr/bin/python diff --git a/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s b/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s index 7d310c28..fa33c6e8 100644 --- a/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s +++ b/docker/llm/finetune/qlora/cpu/docker/Dockerfile.k8s @@ -23,7 +23,7 @@ RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \ # Install python 3.11.1 apt-get update && apt-get install -y openssh-server openssh-client libcap2-bin gnupg2 ca-certificates \ curl wget gpg gpg-agent git \ - gcc g++ make libunwind8-dev zlib1g-dev libssl-dev libffi-dev && \ + gcc g++ make libunwind8-dev zlib1g-dev libssl-dev libffi-dev xz-utils && \ mkdir -p /opt/python && \ cd /opt/python && \ wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz && \ @@ -31,7 +31,6 @@ RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \ cd Python-3.11.1 && \ ./configure --enable-optimizations --with-zlib && \ make altinstall && \ - rm /usr/bin/python3 && \ # Create a symbolic link pointing to Python 3.11 at /usr/bin/python3 ln -s /opt/python/Python-3.11.1/python /usr/bin/python3 && \ # Create a symbolic link pointing to /usr/bin/python3 at /usr/bin/python diff --git a/docker/llm/finetune/xpu/Dockerfile b/docker/llm/finetune/xpu/Dockerfile index 082b6ecb..3bd60706 100644 --- a/docker/llm/finetune/xpu/Dockerfile +++ b/docker/llm/finetune/xpu/Dockerfile @@ -15,12 +15,16 @@ RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRO # update dependencies apt-get update && \ # install basic dependencies - apt-get install -y --no-install-recommends curl wget git gnupg gpg-agent libunwind8-dev vim less && \ + apt-get install -y --no-install-recommends curl wget git libunwind8-dev vim less && \ # install Intel GPU driver apt-get install -y --no-install-recommends intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev --allow-downgrades && \ # install python 3.11 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ env DEBIAN_FRONTEND=noninteractive apt-get update && \ + # add-apt-repository requires gnupg, gpg-agent, software-properties-common + apt-get install -y --no-install-recommends gnupg gpg-agent software-properties-common && \ + # Add Python 3.11 PPA repository + add-apt-repository ppa:deadsnakes/ppa -y && \ apt-get install -y --no-install-recommends python3.11 python3-pip python3.11-dev python3-wheel python3.11-distutils && \ # avoid axolotl lib conflict apt-get remove -y python3-blinker && apt autoremove -y && \ diff --git a/docker/llm/inference-cpp/Dockerfile b/docker/llm/inference-cpp/Dockerfile index cc441983..32a3b6f9 100644 --- a/docker/llm/inference-cpp/Dockerfile +++ b/docker/llm/inference-cpp/Dockerfile @@ -17,11 +17,15 @@ RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRO echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \ chmod 644 /usr/share/keyrings/intel-graphics.gpg && \ apt-get update && \ - apt-get install -y --no-install-recommends curl wget git gnupg gpg-agent sudo && \ + apt-get install -y --no-install-recommends curl wget git sudo && \ # Install PYTHON 3.11 and IPEX-LLM[xpu] ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ env DEBIAN_FRONTEND=noninteractive apt-get update && \ - apt install libunwind8-dev vim less -y && \ + apt-get install -y --no-install-recommends libunwind8-dev vim less && \ + # add-apt-repository requires gnupg, gpg-agent, software-properties-common + apt-get install -y --no-install-recommends gnupg gpg-agent software-properties-common && \ + # Add Python 3.11 PPA repository + add-apt-repository ppa:deadsnakes/ppa -y && \ apt-get install -y --no-install-recommends python3.11 git curl wget && \ rm /usr/bin/python3 && \ ln -s /usr/bin/python3.11 /usr/bin/python3 && \ diff --git a/docker/llm/inference/cpu/docker/Dockerfile b/docker/llm/inference/cpu/docker/Dockerfile index e42e1160..a21feea0 100644 --- a/docker/llm/inference/cpu/docker/Dockerfile +++ b/docker/llm/inference/cpu/docker/Dockerfile @@ -16,6 +16,10 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get update && \ # Install git, curl, and wget apt-get install -y --no-install-recommends git curl wget && \ # Install Python 3.11 + # add-apt-repository requires gnupg, gpg-agent, software-properties-common + apt-get install -y --no-install-recommends gnupg gpg-agent software-properties-common && \ + # Add Python 3.11 PPA repository + add-apt-repository ppa:deadsnakes/ppa -y && \ # Install Python 3.11 apt-get install -y --no-install-recommends python3.11 && \ # Install Python 3.11 development and utility packages diff --git a/docker/llm/inference/xpu/docker/Dockerfile b/docker/llm/inference/xpu/docker/Dockerfile index 142c15e5..67ec1512 100644 --- a/docker/llm/inference/xpu/docker/Dockerfile +++ b/docker/llm/inference/xpu/docker/Dockerfile @@ -22,11 +22,14 @@ RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRO echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \ chmod 644 /usr/share/keyrings/intel-graphics.gpg && \ apt-get update && \ - apt-get install -y --no-install-recommends curl wget git gnupg gpg-agent && \ + apt-get install -y --no-install-recommends curl wget git libunwind8-dev vim less && \ # Install PYTHON 3.11 and IPEX-LLM[xpu] ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ env DEBIAN_FRONTEND=noninteractive apt-get update && \ - apt install libunwind8-dev vim less -y && \ + # add-apt-repository requires gnupg, gpg-agent, software-properties-common + apt-get install -y --no-install-recommends gnupg gpg-agent software-properties-common && \ + # Add Python 3.11 PPA repository + add-apt-repository ppa:deadsnakes/ppa -y && \ apt-get install -y --no-install-recommends python3.11 git curl wget && \ rm /usr/bin/python3 && \ ln -s /usr/bin/python3.11 /usr/bin/python3 && \ diff --git a/docker/llm/inference/xpu/docker/chat.py b/docker/llm/inference/xpu/docker/chat.py index 6401a86b..b6690b98 100644 --- a/docker/llm/inference/xpu/docker/chat.py +++ b/docker/llm/inference/xpu/docker/chat.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import intel_extension_for_pytorch as ipex import torch import argparse import sys @@ -99,4 +98,4 @@ if __name__ == "__main__": stopping_criteria=stopping_criteria, input_str=user_input, chat_history=chat_history) - \ No newline at end of file + diff --git a/docker/llm/serving/xpu/docker/Dockerfile b/docker/llm/serving/xpu/docker/Dockerfile index f1ecf089..7db0bb6a 100644 --- a/docker/llm/serving/xpu/docker/Dockerfile +++ b/docker/llm/serving/xpu/docker/Dockerfile @@ -21,8 +21,7 @@ RUN apt-get update && \ pip install outlines==0.0.34 --no-deps && \ pip install interegular cloudpickle diskcache joblib lark nest-asyncio numba scipy && \ # For Qwen series models support - pip install transformers_stream_generator einops tiktoken && \ - pip uninstall -y deepspeed + pip install transformers_stream_generator einops tiktoken COPY ./vllm_offline_inference.py /llm/ COPY ./payload-1024.lua /llm/ diff --git a/docker/llm/sources/Dockerfile b/docker/llm/sources/Dockerfile index 9ac5f611..a125d3f0 100644 --- a/docker/llm/sources/Dockerfile +++ b/docker/llm/sources/Dockerfile @@ -14,4 +14,5 @@ RUN mkdir -p /usr/local/src/git-source && \ git \ gnupg \ numactl \ - wget \ No newline at end of file + wget \ + software-properties-common \ No newline at end of file