ipex-llm/.github/actions/llm/setup-llm-env/action.yml
Yuwen Hu 5ba1dc38d4 [LLM] Change default Linux GPU install option to PyTorch 2.1 (#9858)
* Update default xpu to ipex 2.1

* Update related install ut support correspondingly

* Add arc ut tests for both ipex 2.0 and 2.1

* Small fix

* Diable ipex 2.1 test for now as oneapi 2024.0 has not beed installed on the test machine

* Update document for default PyTorch 2.1

* Small fix

* Small fix

* Small doc fixes

* Small fixes
2024-01-08 17:16:17 +08:00

44 lines
2.2 KiB
YAML

name: "Setup BigDL-LLM Env"
description: "BigDL-LLM installation"
inputs:
extra-dependency:
description: "Name of extra dependencies filled in brackets"
required: false
default: "all"
runs:
using: "composite"
steps:
- name: Create conda env for llm tests and conduct install tests
shell: bash
run: |
# make sure we install the latest version for bigdl-core-xe related packages
pip uninstall bigdl-core-xe -y || true
pip uninstall bigdl-core-xe-esimd -y || true
pip uninstall bigdl-core-xe-21 -y || true
pip uninstall bigdl-core-xe-esimd-21 -y || true
sed -i 's/"bigdl-core-xe==" + VERSION + "/"bigdl-core-xe/g' python/llm/setup.py
sed -i 's/"bigdl-core-xe-esimd==" + VERSION + "/"bigdl-core-xe-esimd/g' python/llm/setup.py
sed -i 's/"bigdl-core-xe-21==" + VERSION/"bigdl-core-xe-21"/g' python/llm/setup.py
sed -i 's/"bigdl-core-xe-esimd-21==" + VERSION + "/"bigdl-core-xe-esimd-21/g' python/llm/setup.py
pip install requests
if [[ ${{ runner.os }} == 'Linux' ]]; then
bash python/llm/dev/release_default_linux.sh default false
elif [[ ${{ runner.os }} == 'Windows' ]]; then
bash python/llm/dev/release_default_windows.sh default false
else
echo "Runner os is not supported!!!!!"
exit 1
fi
whl_name=$(ls python/llm/dist)
if [[ ${{ inputs.extra-dependency }} == 'xpu_2.0' ]]; then
pip install --upgrade --pre -i https://pypi.python.org/simple --force-reinstall "python/llm/dist/${whl_name}[xpu_2.0]" -f https://developer.intel.com/ipex-whl-stable-xpu
pip install pytest expecttest
elif [[ ${{ inputs.extra-dependency }} == 'xpu_2.1' ]]; then
pip install --upgrade --pre -i https://pypi.python.org/simple --force-reinstall "python/llm/dist/${whl_name}[xpu_2.1]" -f https://developer.intel.com/ipex-whl-stable-xpu
pip install pytest expecttest
else
pip install --upgrade --pre -i https://pypi.python.org/simple --force-reinstall "python/llm/dist/${whl_name}[all]"
pip install pytest
bash python/llm/test/run-llm-install-tests.sh
fi