From ab11af1431e6bebd19357680dd3ed2dce83de4a0 Mon Sep 17 00:00:00 2001 From: Stephan Auerhahn Date: Thu, 3 Aug 2023 17:44:56 -0700 Subject: [PATCH] Add devcontainer configs --- .devcontainer/devcontainer.json | 33 ++++++++++++++++ .../pytorch-1.13+cu117/devcontainer.json | 36 +++++++++++++++++ .../pytorch-2.0+cu118/devcontainer.json | 39 +++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/pytorch-1.13+cu117/devcontainer.json create mode 100644 .devcontainer/pytorch-2.0+cu118/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..fb4c8bf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye", + "features": { + "ghcr.io/devcontainers-contrib/features/hatch:2": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/pipx-package:1": { + "package": "black", + "version": "latest", + "injections": "pylint pytest", + "interpreter": "python3" + }, + "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { + "packages": "libgl1-mesa-glx" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.black-formatter" + ], + "settings": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + } + } + }, + "postCreateCommand": "git config --global --add safe.directory '*'; pip install -r requirements/pt2.txt; pip install -e ." + +} diff --git a/.devcontainer/pytorch-1.13+cu117/devcontainer.json b/.devcontainer/pytorch-1.13+cu117/devcontainer.json new file mode 100644 index 0000000..2e62c80 --- /dev/null +++ b/.devcontainer/pytorch-1.13+cu117/devcontainer.json @@ -0,0 +1,36 @@ +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:1-3.8-bullseye", + "features": { + "ghcr.io/devcontainers/features/nvidia-cuda:1": { + "cudaVersion": "11.7" + }, + "ghcr.io/devcontainers-contrib/features/hatch:2": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/pipx-package:1": { + "package": "black", + "version": "latest", + "injections": "pylint pytest", + "interpreter": "python3" + }, + "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { + "packages": "libgl1-mesa-glx" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.black-formatter" + ], + "settings": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + } + } + }, + "runArgs": ["--gpus", "all"], + "postCreateCommand": "git config --global --add safe.directory '*'; pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117; pip install -r requirements/pt13.txt; pip install -e ." +} diff --git a/.devcontainer/pytorch-2.0+cu118/devcontainer.json b/.devcontainer/pytorch-2.0+cu118/devcontainer.json new file mode 100644 index 0000000..cf187e9 --- /dev/null +++ b/.devcontainer/pytorch-2.0+cu118/devcontainer.json @@ -0,0 +1,39 @@ +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye", + "features": { + "ghcr.io/devcontainers/features/nvidia-cuda:1": { + "cudaVersion": "11.8" + }, + "ghcr.io/devcontainers-contrib/features/hatch:2": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/pipx-package:1": { + "package": "black", + "version": "latest", + "injections": "pylint pytest", + "interpreter": "python3" + }, + "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { + "packages": "libgl1-mesa-glx" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.black-formatter" + ], + "settings": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + } + } + }, + "runArgs": [ + "--gpus", + "all" + ], + "postCreateCommand": "git config --global --add safe.directory '*'; pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 --index-url https://download.pytorch.org/whl/cu118;pip install -r requirements/pt2.txt;pip install -e ." +} \ No newline at end of file