LoginSignup
0
0

Singularityを管理者権限がない環境でインストールする (conda-forge)

Last updated at Posted at 2024-05-29

はじめに

Singularityとは、DockerのようなLinux向けコンテナである。

主にHPC(High performance computing)界隈で使われている。
GitHubのスター数は2024年5月29日時点で677とそこまで多くないが、Qiitaにも60以上の記事があり、使われている場所では使われているソフトウェアのようだ。

なお、しばしばAIの文脈で技術的特異点という意味で使われるシンギュラリティーとは直接関係なさそうである。

管理者権限がない環境で、しかしDockerを実行したいというようなケースでSingularityを使えば動作する場合があるのでここにメモをする。

conda-forgeでのインストール

Dockerは管理者権限がないとインストールできないが、Singularityは管理者権限がなくてもインストールできる。とされるが、実際には難しい。依存するライブラリをAPTでインストールしたりする際に結局管理者権限が必要になったりする。

しかし conda-forge が singularity のパッケージを提供している。これを利用すると何も準備しなくともSingularityがインストールできた。

conda install conda-forge::singularity

インストールしたら、正しく起動できるか確認してみよう。

singularity run shub://GodloveD/lolcow
# singularity --debug run shub://GodloveD/lolcow

次のような画面が表示されたら成功である。

ssh.png

なお、2024年5月29日時点でこの方法でインストールできるSinglarityのバージョンは、

singularity --version
# singularity version 3.8.6

とかなり古いことには注意が必要である。

Dockerの代わりに使う

Dockerの有名なhello-worldを実行する

singularity run docker://hello-world

例としてGATKのイメージを使ってみる

singularity pull docker://broadinstitute/gatk
singularity shell docker://broadinstitute/gatk
gatk CountReads -I input.bam

この記事は以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0