Files
PSO/.devcontainer/devcontainer.json

46 lines
1.4 KiB
JSON

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/miniconda
{
"image": "nvidia/cuda:12.3.2-runtime-ubuntu22.04",
"name": "PSO with cuda",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"donjayamanne.python-extension-pack",
"ms-python.black-formatter",
"github.vscode-github-actions",
"ms-python.isort",
"ms-azuretools.vscode-docker"
]
}
},
"runArgs": [
"--gpus=all"
],
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
"installCudnn": true
},
"ghcr.io/devcontainers/features/conda:1": {
"version": "latest",
"addCondaForge": true
},
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "3.10"
}
},
// 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": [
"conda env create --file environment.yaml --name pso",
"nvidia-smi"
]
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}