🚀 HPC Development Ready 🚀
- Uniform, Reproducible setup of HPC development environment using container
- CUDA, Intel MKL integration, and OpenMP Offloading / OpenACC enabled compilers (GCC, Clang) in a container
- GitHub Actions with container and Visual Studio Code Remote Container exntension settings
ricosjp/allgebra is a project of development containers for HPC developer, and this repository is its sub-project.
- Login to GitHub
- Push "Use this template" button
↗️
See also GitHub Document
Install docker engine, docker compose and NVIDIA container toolkit
- Install NVIDIA Drivers for CUDA on WSL, including DirectML Support
- Install Docker Desktop for Windows
- Confirm docker working in WSL2 mode instead of Hyper-V mode
Then you can run docker
command on cmd.exe or PowerShell
docker run -it --rm --gpus=all ghcr.io/ricosjp/allgebra/cuda11_4/clang12/mkl:21.09.0
Windows 10 is not supported because we cannot handle NVIDIA GPU managed by Windows kernel from WSL2. Please upgrade to Windows 11.
- Clone your repository
- Open the directory by Visual Studio Code
- Install Remote Container extension
- Click the lower left
><
green button in vscode UI - Select "Reopen in Container"
- Select "From docker-compose.yml"
- Then the
docker pull
starts. This will download the allgebra container, which is very large (~8GB) because it contains CUDA and Intel MKL binaries. - You can see the downloading log in the vscode's terminal
- Then the
- If everything goes well, a new vscode window opens with Remote Container extension.
- Run
nvidia-smi
to confirm the GPUs are accessible
- Run
VSCode will expose host's ssh-agent socket into container process, and you can use host SSH key in container. See the official document of vscode for detail. Roughly,
- Start host ssh-agent process
- In Windows, you can check if ssh-agent starts by
Get-Service ssh-agent
- In Windows, you can check if ssh-agent starts by
ssh-add
host key to host ssh-agent- When the key is correctly added,
ssh-add -l
command shows the registered key.
- When the key is correctly added,
- (Re)start Remote Container
- The path of socket connecting to host ssh-agent is written in
$SSH_AUTH_SOCK
env variable ssh-add -l
command shows the key registerred on the host
- The path of socket connecting to host ssh-agent is written in