*  Add devcontainer

* 🐛 Add postCreateCommand.sh

* Downgrade to Python 3.10

* Add gdal

* Separate CPU/GPU devcontainer.json

* Add cpu as default

* Rename default

* In order to enable vscode black auto format, color must be disable !

* Remove default root devcontainer

* Format and clean

* Switch to .[dataset ...]

* Add postStartCommand with pip install -e .

* Fix black

* Update

* Mise à jour des commandes postCreateCommand et postStartCommand dans devcontainer.json

* 🔥 Add devcontainer

* Update Python version and postStartCommand in devcontainer.json
This commit is contained in:
Blanchon 2024-03-02 22:53:34 +01:00 коммит произвёл isaaccorley
Родитель d718b247e2
Коммит 2a6b4bd802
1 изменённых файлов: 52 добавлений и 0 удалений

Просмотреть файл

@ -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"]
}
}
}
}