From b13a08ae8a4921a1e8ece0c91965c042486a67c6 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 3 Feb 2023 10:53:57 +0000 Subject: [PATCH 01/17] =?UTF-8?q?=E2=9C=A8=20Add=20devcontainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..45695682008 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,55 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:0-3.11", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} + }, + + // The arguments required when starting in the container. + "runArgs": [ + // "--ipc=host", + "--gpus=all" // Enable GPU + ], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance", + "cschleiden.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "ms-toolsai.jupyter", + "christian-kohler.path-intellisense" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.flake8Enabled": true, + "python.testing.pytestEnabled":true, + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.editor.formatOnSave": true, + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + } + } + } + }, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From ed3fef40d758a030947a041986158e46ef29cfca Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 3 Feb 2023 10:54:18 +0000 Subject: [PATCH 02/17] =?UTF-8?q?=F0=9F=90=9B=20Add=20postCreateCommand.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/postCreateCommand.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000000..fc164031c96 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +pip install --user -r ./requirements/datasets.txt +pip install --user -r ./requirements/docs.txt +pip install --user -r ./requirements/required.txt +pip install --user -r ./requirements/style.txt +pip install --user -r ./requirements/tests.txt +pip install --user pre-commit \ No newline at end of file From 4e1127fe00a36cd977d33bf819fa39edf32a9b2a Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 3 Feb 2023 18:26:30 +0000 Subject: [PATCH 03/17] Downgrade to Python 3.10 --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 45695682008..9d0629e022d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Python 3", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:0-3.11", + "image": "mcr.microsoft.com/devcontainers/python:0-3.10", // Features to add to the dev container. More info: https://containers.dev/features. "features": { @@ -12,9 +12,9 @@ // The arguments required when starting in the container. "runArgs": [ - // "--ipc=host", - "--gpus=all" // Enable GPU - ], + // "--ipc=host", + // "--gpus=all" // Enable GPU + ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], From f8be16c2740059b2a2d6d2cdca52fa7b4c1b098e Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 3 Feb 2023 18:26:44 +0000 Subject: [PATCH 04/17] Add gdal --- .devcontainer/postCreateCommand.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index fc164031c96..445340599d4 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,5 +1,10 @@ #!/bin/bash - +export DEBIAN_FRONTEND=noninteractive +sudo apt-get -y --force-yes update +sudo apt-get -y --force-yes install libgdal-dev +echo CPLUS_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc +echo C_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc +pip install --upgrade pip pip install --user -r ./requirements/datasets.txt pip install --user -r ./requirements/docs.txt pip install --user -r ./requirements/required.txt From ebffec2f3c67e822566adca13ccf382f5b67775b Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Sat, 4 Feb 2023 00:53:56 +0000 Subject: [PATCH 05/17] Separate CPU/GPU devcontainer.json --- .devcontainer/cpu/devcontainer.json | 72 +++++++++++++++++++++++ .devcontainer/{ => gpu}/devcontainer.json | 44 ++++++++++---- 2 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 .devcontainer/cpu/devcontainer.json rename .devcontainer/{ => gpu}/devcontainer.json (57%) diff --git a/.devcontainer/cpu/devcontainer.json b/.devcontainer/cpu/devcontainer.json new file mode 100644 index 00000000000..b6e0202c4e2 --- /dev/null +++ b/.devcontainer/cpu/devcontainer.json @@ -0,0 +1,72 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Torchgeo Dev - CPU", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:0-3.10", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} + }, + + // The arguments required when starting in the container. + // "runArgs": [], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "bungcip.better-toml" + ], + "settings": { + "telemetry.telemetryLevel": "off", + "python.languageServer": "Pylance", + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.analysis.typeCheckingMode": "basic", + "python.formatting.provider":"black", + "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", + "python.linting.flake8Enabled": true, + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyEnabled": true, + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.mypyArgs": [ + "--follow-imports=silent", + "--ignore-missing-imports", + "--show-error-codes" + ], + "python.linting.pydocstyleEnabled": true, + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", + "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] + } + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/gpu/devcontainer.json similarity index 57% rename from .devcontainer/devcontainer.json rename to .devcontainer/gpu/devcontainer.json index 9d0629e022d..998d6ba73ba 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/gpu/devcontainer.json @@ -1,20 +1,23 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Python 3", + "name": "Torchgeo Dev - GPU", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/python:0-3.10", // Features to add to the dev container. More info: https://containers.dev/features. "features": { - "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} + "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"}, + "ghcr.io/devcontainers/features/nvidia-cuda:1": { + "installCudnn": true + } }, // The arguments required when starting in the container. "runArgs": [ - // "--ipc=host", - // "--gpus=all" // Enable GPU - ], + "--ipc=host", + "--gpus=all" + ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], @@ -30,25 +33,42 @@ "ms-python.isort", "ms-python.black-formatter", "ms-python.vscode-pylance", - "cschleiden.vscode-github-actions", - "GitHub.vscode-pull-request-github", "ms-toolsai.jupyter", - "christian-kohler.path-intellisense" + "bungcip.better-toml" ], "settings": { "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.formatting.provider":"black", + "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", "python.linting.enabled": true, "python.linting.pylintEnabled": true, + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", "python.linting.flake8Enabled": true, - "python.testing.pytestEnabled":true, - "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyEnabled": true, + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.mypyArgs": [ + "--follow-imports=silent", + "--ignore-missing-imports", + "--show-error-codes" + ], + "python.linting.pydocstyleEnabled": true, + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", "python.editor.codeActionsOnSave": { "source.organizeImports": true - } + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] } } - }, + } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" From d7264587220190ee38d18ce9cbc48480e4a9d825 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Sat, 4 Feb 2023 00:56:24 +0000 Subject: [PATCH 06/17] Add cpu as default --- .devcontainer/devcontainer.json | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..b6e0202c4e2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,72 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Torchgeo Dev - CPU", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:0-3.10", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} + }, + + // The arguments required when starting in the container. + // "runArgs": [], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "bungcip.better-toml" + ], + "settings": { + "telemetry.telemetryLevel": "off", + "python.languageServer": "Pylance", + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.analysis.typeCheckingMode": "basic", + "python.formatting.provider":"black", + "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", + "python.linting.flake8Enabled": true, + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyEnabled": true, + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.mypyArgs": [ + "--follow-imports=silent", + "--ignore-missing-imports", + "--show-error-codes" + ], + "python.linting.pydocstyleEnabled": true, + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", + "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] + } + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From e01eec16586165e1c46a689ba0247f674c07c1d9 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Sat, 4 Feb 2023 01:11:18 +0000 Subject: [PATCH 07/17] Rename default --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b6e0202c4e2..d51d83fd6d1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Torchgeo Dev - CPU", + "name": "Torchgeo Dev - CPU - Default", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/python:0-3.10", From 7793f9fa17fad80d615b5c6c181fafed043b641c Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Sat, 4 Feb 2023 01:11:48 +0000 Subject: [PATCH 08/17] In order to enable vscode black auto format, color must be disable ! --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b72c4efc9b3..c85a1e0aad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [tool.black] target-version = ["py38", "py39", "py310"] -color = true +# color = true # Problem with vscode autoformat see: https://github.com/microsoft/vscode-python/issues/16341 skip_magic_trailing_comma = true [tool.coverage.report] From 7fa549cdb24dfcaae2eda3f1689272b278a558b6 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Tue, 11 Apr 2023 22:54:47 +0000 Subject: [PATCH 09/17] Remove default root devcontainer --- .devcontainer/devcontainer.json | 72 --------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index d51d83fd6d1..00000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,72 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/python -{ - "name": "Torchgeo Dev - CPU - Default", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:0-3.10", - - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} - }, - - // The arguments required when starting in the container. - // "runArgs": [], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", - - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "ms-python.isort", - "ms-python.black-formatter", - "ms-python.vscode-pylance", - "ms-toolsai.jupyter", - "bungcip.better-toml" - ], - "settings": { - "telemetry.telemetryLevel": "off", - "python.languageServer": "Pylance", - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.analysis.typeCheckingMode": "basic", - "python.formatting.provider":"black", - "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], - "python.editor.defaultFormatter": "ms-python.black-formatter", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.flake8Enabled": true, - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyEnabled": true, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyArgs": [ - "--follow-imports=silent", - "--ignore-missing-imports", - "--show-error-codes" - ], - "python.linting.pydocstyleEnabled": true, - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", - "python.editor.formatOnSave": true, - "python.editor.formatOnSaveMode": "file", - "python.editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "python.diffEditor.wordWrap": "off", - "isort.args": ["--profile", "black"], - "isort.path": ["/home/vscode/.local/bin/isort"] - } - } - } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} From aa1f8865adb3ee698a4442a389e79a9fec06dfd8 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Tue, 11 Apr 2023 22:55:01 +0000 Subject: [PATCH 10/17] Format and clean --- .devcontainer/cpu/devcontainer.json | 126 ++++++++++++++------------- .devcontainer/gpu/devcontainer.json | 130 ++++++++++++++-------------- 2 files changed, 129 insertions(+), 127 deletions(-) diff --git a/.devcontainer/cpu/devcontainer.json b/.devcontainer/cpu/devcontainer.json index b6e0202c4e2..a0e69e0b827 100644 --- a/.devcontainer/cpu/devcontainer.json +++ b/.devcontainer/cpu/devcontainer.json @@ -1,72 +1,74 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Torchgeo Dev - CPU", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:0-3.10", + "name": "Torchgeo Dev - CPU", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:3.10", - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"} - }, + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": { "version": "os-provided" } + }, - // The arguments required when starting in the container. - // "runArgs": [], + // The arguments required when starting in the container. + // "runArgs": [], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + "postStartCommand": "./.devcontainer/postStartCommand.sh", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "ms-python.isort", - "ms-python.black-formatter", - "ms-python.vscode-pylance", - "ms-toolsai.jupyter", - "bungcip.better-toml" - ], - "settings": { - "telemetry.telemetryLevel": "off", - "python.languageServer": "Pylance", - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.analysis.typeCheckingMode": "basic", - "python.formatting.provider":"black", - "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], - "python.editor.defaultFormatter": "ms-python.black-formatter", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.flake8Enabled": true, - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyEnabled": true, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyArgs": [ - "--follow-imports=silent", - "--ignore-missing-imports", - "--show-error-codes" - ], - "python.linting.pydocstyleEnabled": true, - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", - "python.editor.formatOnSave": true, - "python.editor.formatOnSaveMode": "file", - "python.editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "python.diffEditor.wordWrap": "off", - "isort.args": ["--profile", "black"], - "isort.path": ["/home/vscode/.local/bin/isort"] - } - } - } + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance" + ], + "settings": { + "telemetry.telemetryLevel": "off", + "python.languageServer": "Pylance", + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.analysis.typeCheckingMode": "basic", + "python.formatting.provider": "black", + "python.formatting.blackArgs": [ + "--skip-magic-trailing-comma", + "--no-color" + ], + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", + "python.linting.flake8Enabled": true, + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyEnabled": true, + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.mypyArgs": [ + "--follow-imports=silent", + "--ignore-missing-imports", + "--show-error-codes" + ], + "python.linting.pydocstyleEnabled": true, + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", + "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] + } + } + } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/.devcontainer/gpu/devcontainer.json b/.devcontainer/gpu/devcontainer.json index 998d6ba73ba..29bf99ace32 100644 --- a/.devcontainer/gpu/devcontainer.json +++ b/.devcontainer/gpu/devcontainer.json @@ -1,75 +1,75 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Torchgeo Dev - GPU", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:0-3.10", + "name": "Torchgeo Dev - GPU", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:3.10", - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git:1": {"version": "os-provided"}, - "ghcr.io/devcontainers/features/nvidia-cuda:1": { - "installCudnn": true - } - }, + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git:1": { "version": "os-provided" }, + "ghcr.io/devcontainers/features/nvidia-cuda:1": { + "installCudnn": true + } + }, - // The arguments required when starting in the container. - "runArgs": [ - "--ipc=host", - "--gpus=all" - ], + // The arguments required when starting in the container. + "runArgs": ["--ipc=host", "--gpus=all"], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + "postStartCommand": "./.devcontainer/postStartCommand.sh", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "ms-python.isort", - "ms-python.black-formatter", - "ms-python.vscode-pylance", - "ms-toolsai.jupyter", - "bungcip.better-toml" - ], - "settings": { - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.formatting.provider":"black", - "python.formatting.blackArgs": ["--skip-magic-trailing-comma", "--no-color"], - "python.editor.defaultFormatter": "ms-python.black-formatter", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.flake8Enabled": true, - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyEnabled": true, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyArgs": [ - "--follow-imports=silent", - "--ignore-missing-imports", - "--show-error-codes" - ], - "python.linting.pydocstyleEnabled": true, - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", - "python.editor.formatOnSave": true, - "python.editor.formatOnSaveMode": "file", - "python.editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "python.diffEditor.wordWrap": "off", - "isort.args": ["--profile", "black"], - "isort.path": ["/home/vscode/.local/bin/isort"] - } - } - } + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.isort", + "ms-python.black-formatter", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.formatting.provider": "black", + "python.formatting.blackArgs": [ + "--skip-magic-trailing-comma", + "--no-color" + ], + "python.editor.defaultFormatter": "ms-python.black-formatter", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", + "python.linting.flake8Enabled": true, + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyEnabled": true, + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.mypyArgs": [ + "--follow-imports=silent", + "--ignore-missing-imports", + "--show-error-codes" + ], + "python.linting.pydocstyleEnabled": true, + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", + "python.editor.formatOnSave": true, + "python.editor.formatOnSaveMode": "file", + "python.editor.codeActionsOnSave": { + "source.organizeImports": true + }, + "python.diffEditor.wordWrap": "off", + "isort.args": ["--profile", "black"], + "isort.path": ["/home/vscode/.local/bin/isort"] + } + } + } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } From 4017d2be6dacf74a1564a5cdd53d58c70d21d100 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Tue, 11 Apr 2023 22:55:14 +0000 Subject: [PATCH 11/17] Switch to .[dataset ...] --- .devcontainer/postCreateCommand.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 445340599d4..d3d77bbd5b6 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -5,9 +5,5 @@ sudo apt-get -y --force-yes install libgdal-dev echo CPLUS_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc echo C_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc pip install --upgrade pip -pip install --user -r ./requirements/datasets.txt -pip install --user -r ./requirements/docs.txt -pip install --user -r ./requirements/required.txt -pip install --user -r ./requirements/style.txt -pip install --user -r ./requirements/tests.txt +yes | pip install .[datasets,docs,style,tests] pip install --user pre-commit \ No newline at end of file From 81ba1d0c0cc1e9bc426a571d72a91f02cf0fcdf3 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Tue, 11 Apr 2023 22:55:26 +0000 Subject: [PATCH 12/17] Add postStartCommand with pip install -e . --- .devcontainer/postStartCommand.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 .devcontainer/postStartCommand.sh diff --git a/.devcontainer/postStartCommand.sh b/.devcontainer/postStartCommand.sh new file mode 100755 index 00000000000..7480c74b59e --- /dev/null +++ b/.devcontainer/postStartCommand.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export DEBIAN_FRONTEND=noninteractive +yes | pip install -e . \ No newline at end of file From 4147e06be144a991dd0dc2a77dbf15a2958cfa42 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Tue, 11 Apr 2023 23:02:29 +0000 Subject: [PATCH 13/17] Fix black --- .devcontainer/cpu/devcontainer.json | 3 ++- .devcontainer/gpu/devcontainer.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/cpu/devcontainer.json b/.devcontainer/cpu/devcontainer.json index a0e69e0b827..50e6afb23cf 100644 --- a/.devcontainer/cpu/devcontainer.json +++ b/.devcontainer/cpu/devcontainer.json @@ -56,9 +56,10 @@ "python.linting.pydocstyleEnabled": true, "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", + "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 }, diff --git a/.devcontainer/gpu/devcontainer.json b/.devcontainer/gpu/devcontainer.json index 29bf99ace32..d27c052570b 100644 --- a/.devcontainer/gpu/devcontainer.json +++ b/.devcontainer/gpu/devcontainer.json @@ -60,6 +60,7 @@ "python.testing.pytestPath": "/home/vscode/.local/bin/pytest", "python.editor.formatOnSave": true, "python.editor.formatOnSaveMode": "file", + "python.editor.formatOnPaste": false, "python.editor.codeActionsOnSave": { "source.organizeImports": true }, From 966b2fd571ba7834b6c88c313a00d3526822b2a3 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 1 Mar 2024 22:36:15 +0100 Subject: [PATCH 14/17] Update --- .devcontainer/{cpu => }/devcontainer.json | 7 ++- .devcontainer/gpu/devcontainer.json | 76 ----------------------- .devcontainer/postCreateCommand.sh | 5 +- .devcontainer/postStartCommand.sh | 2 +- 4 files changed, 11 insertions(+), 79 deletions(-) rename .devcontainer/{cpu => }/devcontainer.json (96%) delete mode 100644 .devcontainer/gpu/devcontainer.json diff --git a/.devcontainer/cpu/devcontainer.json b/.devcontainer/devcontainer.json similarity index 96% rename from .devcontainer/cpu/devcontainer.json rename to .devcontainer/devcontainer.json index 50e6afb23cf..a3ae05f4a28 100644 --- a/.devcontainer/cpu/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Torchgeo Dev - CPU", + "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.10", @@ -20,6 +20,11 @@ "postCreateCommand": "./.devcontainer/postCreateCommand.sh", "postStartCommand": "./.devcontainer/postStartCommand.sh", + // Enable GPU support + "hostRequirements": { + "gpu": "optional" + }, + // Configure tool-specific properties. "customizations": { "vscode": { diff --git a/.devcontainer/gpu/devcontainer.json b/.devcontainer/gpu/devcontainer.json deleted file mode 100644 index d27c052570b..00000000000 --- a/.devcontainer/gpu/devcontainer.json +++ /dev/null @@ -1,76 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/python -{ - "name": "Torchgeo Dev - GPU", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:3.10", - - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git:1": { "version": "os-provided" }, - "ghcr.io/devcontainers/features/nvidia-cuda:1": { - "installCudnn": true - } - }, - - // The arguments required when starting in the container. - "runArgs": ["--ipc=host", "--gpus=all"], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", - "postStartCommand": "./.devcontainer/postStartCommand.sh", - - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "ms-python.isort", - "ms-python.black-formatter", - "ms-python.vscode-pylance", - "ms-toolsai.jupyter" - ], - "settings": { - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.formatting.provider": "black", - "python.formatting.blackArgs": [ - "--skip-magic-trailing-comma", - "--no-color" - ], - "python.editor.defaultFormatter": "ms-python.black-formatter", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.flake8Enabled": true, - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyEnabled": true, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyArgs": [ - "--follow-imports=silent", - "--ignore-missing-imports", - "--show-error-codes" - ], - "python.linting.pydocstyleEnabled": true, - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "/home/vscode/.local/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"] - } - } - } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index d3d77bbd5b6..d85ae2cf979 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,9 +1,12 @@ #!/bin/bash -export DEBIAN_FRONTEND=noninteractive +# Update and install GDAL sudo apt-get -y --force-yes update sudo apt-get -y --force-yes install libgdal-dev +# Add GDAL to the environment variables echo CPLUS_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc echo C_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc +source ~/.bashrc +# Update pip and install the package pip install --upgrade pip yes | pip install .[datasets,docs,style,tests] pip install --user pre-commit \ No newline at end of file diff --git a/.devcontainer/postStartCommand.sh b/.devcontainer/postStartCommand.sh index 7480c74b59e..c178b65c464 100755 --- a/.devcontainer/postStartCommand.sh +++ b/.devcontainer/postStartCommand.sh @@ -1,3 +1,3 @@ #!/bin/bash -export DEBIAN_FRONTEND=noninteractive +# Install package yes | pip install -e . \ No newline at end of file From 098bf84f027c78562dc9c9459a4608aef455c134 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 1 Mar 2024 22:12:23 +0000 Subject: [PATCH 15/17] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20commandes=20?= =?UTF-8?q?postCreateCommand=20et=20postStartCommand=20dans=20devcontainer?= =?UTF-8?q?.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 32 ++++++++---------------------- .devcontainer/postCreateCommand.sh | 12 ----------- .devcontainer/postStartCommand.sh | 3 --- 3 files changed, 8 insertions(+), 39 deletions(-) delete mode 100755 .devcontainer/postCreateCommand.sh delete mode 100755 .devcontainer/postStartCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a3ae05f4a28..994ffae68e7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,8 +17,8 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", - "postStartCommand": "./.devcontainer/postStartCommand.sh", + "postCreateCommand": "pip install .[datasets,docs,style,tests]", + "postStartCommand": "pip install -e .", // Enable GPU support "hostRequirements": { @@ -32,34 +32,18 @@ "ms-python.python", "ms-python.isort", "ms-python.black-formatter", - "ms-python.vscode-pylance" + "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.analysis.typeCheckingMode": "basic", - "python.formatting.provider": "black", - "python.formatting.blackArgs": [ - "--skip-magic-trailing-comma", - "--no-color" - ], - "python.editor.defaultFormatter": "ms-python.black-formatter", "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.flake8Enabled": true, - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyEnabled": true, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyArgs": [ - "--follow-imports=silent", - "--ignore-missing-imports", - "--show-error-codes" - ], - "python.linting.pydocstyleEnabled": true, - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", "python.testing.pytestEnabled": true, "python.testing.pytestPath": "/usr/local/py-utils/bin/pytest", "python.editor.formatOnSave": true, diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh deleted file mode 100755 index d85ae2cf979..00000000000 --- a/.devcontainer/postCreateCommand.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# Update and install GDAL -sudo apt-get -y --force-yes update -sudo apt-get -y --force-yes install libgdal-dev -# Add GDAL to the environment variables -echo CPLUS_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc -echo C_INCLUDE_PATH=/usr/include/gdal >> ~/.bashrc -source ~/.bashrc -# Update pip and install the package -pip install --upgrade pip -yes | pip install .[datasets,docs,style,tests] -pip install --user pre-commit \ No newline at end of file diff --git a/.devcontainer/postStartCommand.sh b/.devcontainer/postStartCommand.sh deleted file mode 100755 index c178b65c464..00000000000 --- a/.devcontainer/postStartCommand.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -# Install package -yes | pip install -e . \ No newline at end of file From 50e1378a2375d8fd6f56697b737bae9be5e7ee4c Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Fri, 1 Mar 2024 22:13:35 +0000 Subject: [PATCH 16/17] =?UTF-8?q?=F0=9F=94=A5=20Add=20devcontainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 994ffae68e7..782787d3b19 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,4 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/python { "name": "Torchgeo DevContainer", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile @@ -10,13 +9,6 @@ "ghcr.io/devcontainers/features/git:1": { "version": "os-provided" } }, - // The arguments required when starting in the container. - // "runArgs": [], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "pip install .[datasets,docs,style,tests]", "postStartCommand": "pip install -e .", @@ -25,7 +17,6 @@ "gpu": "optional" }, - // Configure tool-specific properties. "customizations": { "vscode": { "extensions": [ @@ -58,7 +49,4 @@ } } } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" } From e18865916bccdf4cc5b4df2f33a1e13fe3246762 Mon Sep 17 00:00:00 2001 From: Julien Blanchon Date: Sat, 2 Mar 2024 15:10:17 +0100 Subject: [PATCH 17/17] Update Python version and postStartCommand in devcontainer.json --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 782787d3b19..97f2eb2e660 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,15 +2,15 @@ { "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.10", + "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": "pip install .[datasets,docs,style,tests]", - "postStartCommand": "pip install -e .", + // "postCreateCommand": "", + "postStartCommand": "pip install -e .[all]", // Enable GPU support "hostRequirements": {