exo icon indicating copy to clipboard operation
exo copied to clipboard

Can exo link Windows?

Open wu21-web opened this issue 10 months ago • 6 comments

wu21-web avatar Feb 02 '25 06:02 wu21-web

nope https://github.com/exo-explore/exo/issues?q=is%3Aissue%20state%3Aopen%20windows

pyrater avatar Feb 02 '25 14:02 pyrater

i stand corrected i was able to make it work on windows after a ton of messing around with WSL firewalls, python cuda installs etc

Image

pyrater avatar Feb 02 '25 16:02 pyrater

here is a completely unsupported windows install script.

`@echo off title Exo Installation and Management Script :menu cls echo ========================================== echo Exo Installation Script echo ========================================== echo 1. Install WSL2 and Configure Environment echo 2. Install and Run Exo in WSL echo 3. Install PyTorch with CUDA in WSL echo 4. Fix GPU Detection Issues echo 5. Shutdown WSL echo 6. Exit echo ========================================== set /p choice="Enter your choice: "

if "%choice%"=="1" goto install_wsl if "%choice%"=="2" goto install_exo if "%choice%"=="3" goto install_pytorch if "%choice%"=="4" goto fix_gpu if "%choice%"=="5" goto shutdown_wsl if "%choice%"=="6" exit goto menu

:install_wsl cls echo Checking WSL2 installation... wsl --version >nul 2>&1 if %errorlevel%==0 ( echo WSL2 is already installed. ) else ( echo Installing WSL2... wsl --install if not %errorlevel%==0 ( echo WSL installation failed. Ensure you have administrative privileges. pause goto menu ) )

echo Checking WSL2 default version... wsl -l -v | findstr "VERSION 2" >nul 2>&1 if %errorlevel%==0 ( echo WSL2 is already the default version. ) else ( echo Setting WSL2 as the default version... wsl --set-default-version 2 if not %errorlevel%==0 ( echo Failed to set WSL2 as default. Ensure your Windows version supports WSL2. pause goto menu ) )

echo Checking if Ubuntu is installed... wsl -l -v | findstr "Ubuntu" >nul 2>&1 if %errorlevel%==0 ( echo Ubuntu is already installed. ) else ( echo Installing Ubuntu... wsl --install -d Ubuntu if not %errorlevel%==0 ( echo Failed to install Ubuntu. Ensure WSL is properly set up. pause goto menu ) )

echo Configuring .wslconfig file... if exist "%USERPROFILE%.wslconfig" ( echo .wslconfig file already exists. Skipping configuration. ) else ( ( echo [wsl2] echo gpu=true echo networkingMode=mirrored echo firewall=false ) > "%USERPROFILE%.wslconfig" echo .wslconfig file created. )

echo Checking firewall rules... powershell -Command "Get-NetFirewallRule -DisplayName 'WSL UDP Exo'" >nul 2>&1 if %errorlevel%==0 ( echo Firewall rule for WSL UDP Exo already exists. ) else ( echo Adding firewall rule for WSL UDP Exo... powershell -Command "New-NetFirewallRule -DisplayName 'WSL UDP Exo' -Direction Inbound -Action Allow -Protocol UDP -LocalPort 5678" )

powershell -Command "Get-NetFirewallRule -DisplayName 'Allow WSL Python'" >nul 2>&1 if %errorlevel%==0 ( echo Firewall rule for Allow WSL Python already exists. ) else ( echo Adding firewall rule for Allow WSL Python... powershell -Command "New-NetFirewallRule -DisplayName 'Allow WSL Python' -Direction Inbound -Action Allow -Program 'C:\Windows\System32\wsl.exe'" )

echo WSL installation and configuration complete! pause goto menu

:install_exo cls echo Checking if Exo is already installed... wsl -e bash -c "test -d ~/exo && echo 'Exo is already installed.'" | findstr "Exo is already installed." >nul 2>&1 if %errorlevel%==0 ( echo Exo is already installed. ) else ( echo Installing Exo... echo Updating package lists and installing dependencies... wsl -e bash -c "sudo apt update && sudo apt upgrade -y" wsl -e bash -c "sudo apt install -y git python3 python3-pip python3-venv" echo Cloning Exo repository... wsl -e bash -c "git clone https://github.com/exo-explore/exo.git ~/exo" echo Creating Python virtual environment and installing Exo... wsl -e bash -c "python3 -m venv ~/exo/venv && source ~/exo/venv/bin/activate && pip install -e ~/exo" )

echo Starting Exo with GPU support... wsl -e bash -c "source ~/exo/venv/bin/activate && CUDA_VISIBLE_DEVICES=0 python ~/exo/main.py --node-host 0.0.0.0 --inference-engine=nvidia"

pause goto menu

:install_pytorch cls echo Installing PyTorch with CUDA support in WSL...

echo Uninstalling existing PyTorch versions... wsl -e bash -c "source ~/exo/venv/bin/activate && pip uninstall torch torchvision torchaudio -y"

echo Installing PyTorch with CUDA... wsl -e bash -c "source ~/exo/venv/bin/activate && pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118"

echo Verifying PyTorch installation... wsl -e bash -c "source ~/exo/venv/bin/activate && python -c 'import torch; print(torch.version); print(torch.cuda.is_available())'"

pause goto menu

:fix_gpu cls echo Fixing GPU Detection Issues... wsl -e bash -c "ls /dev | grep dxg" if %errorlevel%==0 ( echo GPU passthrough is enabled. ) else ( echo GPU passthrough is missing! Updating WSL kernel... wsl --update wsl --shutdown )

echo Checking if NVIDIA drivers are installed... wsl -e bash -c "nvidia-smi" if %errorlevel%==0 ( echo NVIDIA drivers are installed correctly. ) else ( echo ERROR: NVIDIA drivers are missing! Please install them from https://developer.nvidia.com/cuda/wsl/download )

pause goto menu

:shutdown_wsl cls echo Checking if WSL is running... wsl --list | findstr "Ubuntu" >nul 2>&1 if %errorlevel%==0 ( echo Shutting down WSL... wsl --shutdown echo WSL successfully shut down! ) else ( echo WSL is not running. Nothing to shut down. )

pause goto menu `

pyrater avatar Feb 02 '25 16:02 pyrater

still crashes when i try to prompt it

pyrater avatar Feb 02 '25 16:02 pyrater

I think there are a few mistakes involved in following those instructions but then again I'm a novice. Correct me if I'm wrong, I'm just discovering things as I go along in the great AI adventure...

You don't want to install another nvidia driver into wsl. The nvidia driver installed in windows is what does the job. You do install the cuda toolkit for wsl and cudnn for wsl though. You'll will also need to add the path to cuda to the bashrc file. You must make sure that the pytorch version suits the cuda version, however 118 probably isn't the correct one in this case being for cuda 11. The present exo code appears to be set up around driver 560.xx and cuda 12.6? which would be pytorch 126. If you use the most recent nvidia driver 570.xx and the toolkit offered at nvidia (not from archive) thats cuda 12.8 and the appropriate pytorch 128, isnt available for that yet.- won't be until July 2025 I believe. Also be careful not to download the cuda runfile file version because that also contains the driver and that isn't needed/wanted in wsl.

Hope that helps a fellow traveller.

BTW I think the inference engine = tinygrad rather than nvidia???

I want to thank the people developing this concept/code. I hope it will continue to be improved. As someone who has only recently decided to find out about AI through the Deepseek R1 drop I have a lot to learn including how to do things in Linux(WSL). It would probably be appreciated by persons like myself if the contributors here could be a little more verbose than usual with their instructions. I understand Deepseek has had something like 10M downloads so I am sure there will be a few people landing here sometime with basic questions and a deficit of skills and knowledge. Thanks for your patience.

ai-exo avatar Feb 09 '25 11:02 ai-exo

https://github.com/exo-explore/exo/issues/237

Shivp1413 avatar Mar 25 '25 14:03 Shivp1413