-
Setup WSL
-
Install wsl:
wsl --install -d Ubuntu
-
Run Powershell as Administrator and enter:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2
-
Press Win and type "Windows Features" and toggle:
- Windows Subsystems for Linux
- Virtual Machine Platform
-
-
Setup Ubuntu environment
- Access WSL from Powershell:
wsl
- Update and install packages:
sudo apt update && sudo apt upgrade sudo apt install ffmpeg libgl1-mesa-glx libgl1-mesa-dev libsm6 libxext6 gcc build-essential python-dev*
- Install python dependencies:
sudo apt install python3.10-venv python3-pip
- Access WSL from Powershell:
-
Setup Python environment
-
Create a virtual environment:
python -m venv path/to/venv/dir/venv_name # troubleshooting (if you only have python3) ln -sf $(which python3) /usr/bin/python python -m venv path/to/venv # if it still doesn't work try with sudo sudo python -m venv path/to/venv
-
Activate environment:
source /path/to/venv/dir/bin/activate
-
Install useful packages:
pip install cmake wheel
-
-
Install ITREX (intell extension for transformers)
git clone https://github.com/intel/intel-extension-for-transformers.git cd intel-extension-for-transformers pip install -r requirements.txt pip install -v . # if it runs out of memory try MAX_JOBS=1 pip install -v .
-
Install Neural Speed
git clone https://github.com/intel/neural-speed.git cd neural-speed pip install -r requirements.txt pip install -v . # if it runs out of memory try MAX_JOBS=1 pip install -v .
- Subprocess timeout (https://github.com/pypa/setuptools_scm/pull/808/files):
- Edit path/to/venv/lib/python3.10/site-packages/setuptools_scm/git_ line 58
- Increase default timeout to 600
"# if it runs out of memory try
MAX_JOBS=1 pip install -v ."
Thank you !!!!!!!!!!!
I can't believe 32GB memory is still too small to build neural-spped