Skip to content

Commit 4b44ada

Browse files
committed
fix
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent 9c4e9f8 commit 4b44ada

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.azure-pipelines/scripts/install_nc.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22

33
echo -e "##[group]Install Neural Compressor ... "
44
cd /neural-compressor
5+
if command -v pip &> /dev/null; then
6+
alias pip="pip"
7+
else
8+
alias pip="uv pip"
9+
fi
510
if [[ $1 = *"3x_pt"* ]]; then
6-
python -m pip install --no-cache-dir -r requirements_pt.txt
11+
pip install --no-cache-dir -r requirements_pt.txt
712
if [[ $1 = *"hpu"* ]]; then
813
pip uninstall neural_compressor_3x_pt -y || true
914
elif [[ $1 = *"xpu"* ]]; then
1015
echo -e "\n Install torch XPU ... "
11-
uv pip install torch==2.9.1 torchvision --index-url https://download.pytorch.org/whl/xpu
12-
uv pip install auto-round-lib==0.10.2.1 # mapping torch and auto-round version
16+
pip install torch==2.9.1 torchvision --index-url https://download.pytorch.org/whl/xpu
17+
pip install auto-round-lib==0.10.2.1 # mapping torch and auto-round version
1318
else
1419
echo -e "\n Install torch CPU ... "
1520
pip install torch==2.9.1 torchvision --index-url https://download.pytorch.org/whl/cpu
1621
pip install auto-round-lib==0.10.2.1 # mapping torch and auto-round version
1722
fi
1823
python setup.py pt bdist_wheel
19-
python -m pip install --no-deps dist/neural_compressor*.whl --force-reinstall
24+
pip install --no-deps dist/neural_compressor*.whl --force-reinstall
2025
elif [[ $1 = *"3x_tf"* ]]; then
2126
pip install tensorflow==2.19.0
2227
python -m pip install --no-cache-dir -r requirements.txt
@@ -31,4 +36,4 @@ fi
3136

3237
echo -e "\n pip list after install Neural Compressor ... "
3338
echo "##[endgroup]"
34-
python -m pip list
39+
pip list

0 commit comments

Comments
 (0)