Skip to content

HPC Project repository template using allgebra containers

License

Notifications You must be signed in to change notification settings

ricosjp/allgebra-repository-template

Repository files navigation

Template for HPC Project

🚀 HPC Development Ready 🚀

Features

ricosjp/allgebra is a project of development containers for HPC developer, and this repository is its sub-project.

Create new repository

  • Login to GitHub
  • Push "Use this template" button ↗️

See also GitHub Document

Install Docker with NVIDIA container toolkit

For Linux

Install docker engine, docker compose and NVIDIA container toolkit

For Windows 11 (CUDA on WSL2)

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.

VSCode setup

  • 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
  • If everything goes well, a new vscode window opens with Remote Container extension.
    • Run nvidia-smi to confirm the GPUs are accessible

Use host SSH key in container

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
  • ssh-add host key to host ssh-agent
    • When the key is correctly added, ssh-add -l command shows the registered key.
  • (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

Recommended Extensions