Fix docker images (#11362)
* Fix docker images * add-apt-repository requires gnupg, gpg-agent, software-properties-common * update * avoid importing ipex again
This commit is contained in:
parent
d9dd1b70bd
commit
5aa3e427a9
13 changed files with 67 additions and 54 deletions
14
.github/workflows/manually_build.yml
vendored
14
.github/workflows/manually_build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
39
.github/workflows/manually_build_for_testing.yml
vendored
39
.github/workflows/manually_build_for_testing.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
25
.github/workflows/nightly_build.yml
vendored
25
.github/workflows/nightly_build.yml
vendored
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 && \
|
||||
|
|
|
|||
|
|
@ -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 && \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 && \
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ RUN mkdir -p /usr/local/src/git-source && \
|
|||
git \
|
||||
gnupg \
|
||||
numactl \
|
||||
wget
|
||||
wget \
|
||||
software-properties-common
|
||||
Loading…
Reference in a new issue