Skip to content

Commit eb182f4

Browse files
SmartManojgithub-actionsneubig
authored
Feat: Dev Container for GitHub Codespaces (OpenHands#2689)
* Workaround for GitHub Codespaces * Add devcontainer config * rename devcontainer folder * install netcat * add VS Code Python extension * apt update * give executable path to avoid bugs * configure poetry env * fix postCreateCommand * revert executable path * add postStartCommand * run in background * Add Codespaces badge * add default config * Add Codespaces badge to doc * update comment * apply workaround 2 * refactor * fix lib path * Update on_create.sh * pass env directly to cmd * resolve unexpected merge conflicts * Separated to OpenHands#2850 * Update README.md Co-authored-by: Graham Neubig <[email protected]> * Update codespaces link * Update README.md * Separated to OpenHands#2975 --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: Graham Neubig <[email protected]>
1 parent b1ea204 commit eb182f4

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

.devcontainer/README.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The files in this directory configure a development container for GitHub Codespaces.

.devcontainer/devcontainer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "OpenDevin Codespaces",
3+
"image": "mcr.microsoft.com/devcontainers/universal",
4+
"customizations":{
5+
"vscode":{
6+
"extensions": [
7+
"ms-python.python"
8+
]
9+
}
10+
},
11+
"onCreateCommand": "sh ./.devcontainer/on_create.sh",
12+
"postCreateCommand": "make build",
13+
"postStartCommand": "USE_HOST_NETWORK=True nohup bash -c 'make run &'"
14+
15+
}

.devcontainer/on_create.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
sudo apt update
3+
sudo apt install -y netcat
4+
sudo add-apt-repository -y ppa:deadsnakes/ppa
5+
sudo apt install -y python3.11
6+
curl -sSL https://install.python-poetry.org | python3.11 -
7+
# chromadb requires SQLite > 3.35 but SQLite in Python3.11.9 comes with 3.31.1
8+
sudo cp /opt/conda/lib/libsqlite3.so.0 /lib/x86_64-linux-gnu/libsqlite3.so.0

0 commit comments

Comments
 (0)