Install WSL2 Ubuntu
wsl --install -d Ubuntu
# (manually) launch a terminal
# wsl ~ -d Ubuntu
You will need to setup your username and password
Update packages
sudo apt update -y && sudo apt upgrade -y
Install SQLite3 Make, and Pipx
# Note: We also update SQLite3 to latest available for future
# ISSUE: https://github.com/OpenDevin/OpenDevin/issues/571
sudo apt install -y sqlite3 make pipx
Install NVM and NodeJS Latest
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# resouce
source ~/.bashrc
# Install Current LTS version of NodeJS
nvm install --lts
# Use Latest Node Version
nvm use default
# Update npm
# npm update -g
npm install npm@latest -g
Install MiniConda
# https://docs.anaconda.com/free/miniconda/index.html#quick-command-line-install
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
# Init Miniconda
~/miniconda3/bin/conda init bash
# Resource Bash
source ~/.bashrc
Create a conda environment for OpenDevin with poetry
and python 3.11
# python requirement is taken from README (check readme for update)
# requests and urllib3 are for fixing poetry 'HTTPResponse' object has no attribute 'strict' error
# ISSUE: python-poetry/poetry/issues/7936
conda create -y --quiet -n od python=3.11 poetry requests urllib3==1.26.15
# Update Poetry
pip3 install --upgrade poetry
Install Docker
# Read Release
. /etc/os-release
# Get PGP Keys
curl -fsSL https://download.docker.com/linux/${ID}/gpg | sudo tee /etc/apt/trusted.gpg.d/docker.asc
# Add Repository
echo "deb [arch=amd64] https://download.docker.com/linux/${ID} ${VERSION_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/docker.list
# Update Package Cache
sudo apt update
# Install Docker
sudo apt install -y docker-ce docker-ce-cli containerd.io
Adding a Docker user for safety
# Create a Docker group
sudo groupadd docker
# Add a Docker User
sudo usermod -aG docker $USER
# Logout and Login again so your permissions are evaluated again (or type)
newgrp docker
Docker Config (optional)
# Find a unused group id (keep repeating until you find one)
getent group | grep 36257 || echo "This ID is not in use."
# Use that group id
sudo sed -i -e 's/^\(docker:x\):[^:]\+/\1:36257/' /etc/group
# Exit WSL and shutdown
exit
wsl --shutdown
# Follow the rest of the steps if you want docker to auto start with your WSL2 Distro
# https://dataedo.com/docs/installing-docker-on-windows-via-wsl
[💭 SKIP] Pull ghcr.io/opendevin/sandbox
image for cache
docker pull ghcr.io/opendevin/sandbox
Clone OpenDevin
git clone https://github.com/OpenDevin/OpenDevin.git ~/OpenDevin
cd ~/OpenDevin
Make
cd ~/OpenDevin
make
To configure your API run this
make setup-config
# this makes a config.toml file that looks like this
LLM_MODEL="gpt-3.5-turbo-1106"
LLM_API_KEY="sk-..."
LLM_EMBEDDING_MODEL="openai"
WORKSPACE_DIR="./workspace"
Run Devin API
# make start-backend
# make start-frontend
uvicorn opendevin.server.listen:app --port 3000
If you ever get stuck and get errors. clean your git clone by running this and follow the steps again
cd ~/OpenDevin
git fetch origin master
git checkout --force -B master origin/master
git reset --hard
git clean -fdx
wsl --shutdown
wsl --unregister Ubuntu
# Then install Ubuntu again and follow the steps from beginning
wsl --install -d Ubuntu