use feature to install pytorch

This commit is contained in:
Stephan Auerhahn
2023-08-12 05:59:57 +00:00
parent ab11af1431
commit 3167b358c0
3 changed files with 58 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
{
"name": "Python 3",
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
"features": {
"ghcr.io/devcontainers-contrib/features/hatch:2": {
@@ -13,6 +13,10 @@
},
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
"packages": "libgl1-mesa-glx"
},
"ghcr.io/stability-ai/devcontainer-features/pytorch:1.0.1": {
"version": "2.0.1",
"cudaVersion": "cpu"
}
},
"customizations": {
@@ -23,11 +27,19 @@
"ms-python.black-formatter"
],
"settings": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
"[python]": {
"diffEditor.ignoreTrimWhitespace": false,
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.wordBasedSuggestions": false
},
"python.analysis.typeCheckingMode": "basic",
"black-formatter.args": [
"-l 88"
]
}
}
},
"postCreateCommand": "git config --global --add safe.directory '*'; pip install -r requirements/pt2.txt; pip install -e ."
}
},
"postCreateCommand": "git config --global --add safe.directory '*'",
"postAttachCommand": "pip install -U -r requirements/pt2.txt;pip install -U -e ."
}