Developing inside a container (advanced)#
This repo provides a Devcontainer configuration for Visual Studio Code to use a Docker container as a pre-configured development environment. This avoids struggles setting up a development environment and makes them reproducible and consistent.
If that sounds useful to you, we recommend you first make yourself familiar with the container tutorials if you want to use them. The devcontainer.json file assumes that you have a GPU locally by default. If not, you can simply comment out the "--gpus" flag in the .devcontainer/devcontainer.json
file.
-
Setup Docker on your local machine
On an Linux machine where you have root access, you can install Docker using the following commands:
On Windows or Mac, follow these installation instructions
-
(optional) Install the nvidia-container-toolkit to use your local machine's GPU(s).
-
Install the Dev Containers extension for Visual Studio Code.
-
When opening repository in Visual Studio Code, you should be prompted to reopen the repository in a container:
Alternatively, you can open the command palette (Ctrl+Shift+P) and select
Dev Containers: Rebuild and Reopen in Container
.
Launching container jobs on SLURM clusters#
This part is still a work in progress. In principle, developing inside a devcontainer should make it easier to ship the images to slurm clusters and run them as jobs.