[Artificial Intelligence (AI) general discussion] jenneh:
Hello Friends,

Today I would like to share installation instructions for OpenDevin, another Devin competitor that has 22 thousand stars on Github at the time of writing. I am not the creator of this project nor am I being sponsored in some way, I just spent too much time trying to get this agent running and want to share my steps with you. Use your own discretion downloading random projects off Github.

This code will install everything you need to run OpenDevin, Ollama if you choose, and setup an alias so that you can simply type backend and then frontend in separate Debian WSL terminals and be able to access OpenDevin in your browser.

Video of the installation steps from start to finish:

Please note in the video the agent did not have sudo permissions, idk if it is something we can give them or not, I cannot play with this further until the weekend.

DEPENDENCIES

POWERSHELL (ps):

All code shared below should be run in Powershell as Admin (until we get Debian installed in WSL).

If you do not have the WSL feature enabled and Virtual Machine Platform, run this code first, and reset your machine:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux,VirtualMachinePlatform

DOCKER:

Install Docker Desktop on Windows

Get started with Docker for Windows. This guide covers system requirements, where to download, and instructions on how to install and update.

docs.docker.com

Install WSL2 Update from Microsoft, Direct Download Link:

https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

Run this code in ps to update your WSL to version 2 and set WSL to default all future distros to V2, and install Debian in WSL

wsl --set-default-version 2; wsl --install -d Debian;

Setup a username and password, then we need to shutdown wsl and integrate it into Docker. Run this code:

exit
wsl --shutdown

Then in Docker we need to go into settings and under resources, enable debian wsl integration.

Reset your computer after this step.

After the reboot, remember to run Docker, and when it is up, open Debian.

Then run this code to build OpenDevin:

sudo apt update && sudo apt upgrade -y && sudo apt install curl docker docker.io git make npm python-is-python3 -y && curl -sSL https://install.python-poetry.org | python3 && echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc && git clone https://github.com/OpenDevin/OpenDevin.git && cd OpenDevin && make build && echo "alias frontend='cd ~/OpenDevin && make start-frontend'" >> ~/.bashrc && source ~/.bashrc && echo "alias backend='cd ~/OpenDevin && make start-backend'" >> ~/.bashrc && source ~/.bashrc && mkdir workspace && make setup-config

If you plan on using claude, chatgpt or any llm that requires an api key, enter your information for that model and you are done.

(The very end of the video shows GPT-4 Turbo being ran and iterating after being re-prompted.)

Else, if you want to use ollama hosted models (Method only for nvidia gpus):

Set these values:

ollama/mistral (or instead of mistral, set whatever ollama model you want to run --- note that mistral 7b is only an example to make sure everything on OpenDevin's side is working, Mistral 7b does not work well as shown in the video. We need to run bigger models)
ollama
http://localhost:11434
local
./workspace

In nvidia settings, select control panel, click on Desktop, then enable developer settings.

Select manage gpu performace counters on the left

Select allow access

Run this command to install Ollama and the dependencies:

sudo apt install pciutils lshw python3-pip wget -y && wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin && sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 && wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda-repo-wsl-ubuntu-12-4-local_12.4.1-1_amd64.deb && sudo dpkg -i cuda-repo-wsl-ubuntu-12-4-local_12.4.1-1_amd64.deb && sudo cp /var/cuda-repo-wsl-ubuntu-12-4-local/cuda-*-keyring.gpg /usr/share/keyrings/ && sudo apt-get update && sudo apt-get -y install cuda-toolkit-12-4 && echo 'export PATH=/usr/local/cuda-12.4/bin:${PATH:+:${PATH}}' >> ~/.bashrc && source ~/.bashrc && sudo apt install python3-torch python3-torchvision python3-torchaudio -y && curl -fsSL https://ollama.com/install.sh | sh && ollama serve

To download an Ollama model, open a new Debian window and run:

ollama pull mistral

(or change mistral to any model name)

Model list:

library

Get up and running with large language models.

ollama.com

Then to start OpenDevin, in Debian run:

backend

And in a new Debian terminal run:

frontend

Then in a web browser type:

localhost:3001

Ollama users remember to run your server in the future, so open a third Debian terminal and run:

ollama serve

Also, don't forget to run docker again when you come back to your project!!

To access your Debian folders in Windows, paste this command in the toolbar of File Explorer:

\\wsl.localhost\Debian\home

To change models / api keys / workspace directory run:

make setup-config

# To Uninstall Debian In WSL, run this code:

wsl --shutdown; wsl --unregister Debian

Then make sure to uninstall Debian in settings - Add or Remove a program

Spoiler content hidden.