diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..97f2eb2e660 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,52 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +{ + "name": "Torchgeo DevContainer", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:3.12", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": { "version": "os-provided" } + }, + + // "postCreateCommand": "", + "postStartCommand": "pip install -e .[all]", + + // Enable GPU support + "hostRequirements": { + "gpu": "optional" + }, + + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance", + "ms-python.pylint", + "ms-python.flake8", + "ms-python.mypy-type-checker", + "GitHub.codespaces", + "ms-toolsai.jupyter" + ], + "settings": { + "telemetry.telemetryLevel": "off", + "python.languageServer": "Pylance", + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/usr/local/py-utils/bin/pytest", + "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", + "python.editor.formatOnPaste": false, + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] + } + } + } +}