feat: Add dev container (#8589)

This commit is contained in:
Kent Johnson 2025-05-26 20:35:27 -05:00 committed by GitHub
parent 83bfbc7045
commit 35d2281717
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,15 @@
// For format details, see: https://aka.ms/devcontainer.json
{
"name": "Python 3",
// Documentation for this image:
// - https://github.com/devcontainers/templates/tree/main/src/python
// - https://github.com/microsoft/vscode-remote-try-python
// - https://hub.docker.com/r/microsoft/devcontainers-python
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers-extra/features/poetry:2": {},
"ghcr.io/devcontainers/features/node:1": {},
},
"postCreateCommand": ".devcontainer/setup.sh",
}

7
.devcontainer/setup.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# Install `nc`
sudo apt update && sudo apt install netcat -y
# Do common setup tasks
source .openhands/setup.sh

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*]
# force *nix line endings so files don't look modified in container run from Windows clone
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

6
.gitattributes vendored
View File

@ -1 +1,7 @@
*.ipynb linguist-vendored
# force *nix line endings so files don't look modified in container run from Windows clone
* text eol=lf
# Git incorrectly thinks some media is text
*.png -text
*.mp4 -text

9
.gitignore vendored
View File

@ -161,9 +161,16 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.vscode/
.cursorignore
# VS Code: Ignore all but certain files that specify repo-specific settings.
# https://stackoverflow.com/questions/32964920/should-i-commit-the-vscode-folder-to-source-control
.vscode/**/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
# evaluation
evaluation/evaluation_outputs
evaluation/outputs

View File

@ -9,4 +9,5 @@ python -m pip install pre-commit
if [ -d ".git" ]; then
echo "Installing pre-commit hooks..."
pre-commit install
make install-pre-commit-hooks
fi

6
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
// force *nix line endings so files don't look modified in container run from Windows clone
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
}