EMANをSingularityで用意してみる

EMANは既にEMAN2.91とか進んでいるのですが、昔のEMANを使いたい方がいた場合、CentOS6かCentOS7で用意することになる
っが、そのための計算機を用意すするのは微妙で、コンテナ技術、Singularityを使って用意してみた

[illya@rockylinux ~]$ sudo singularity build --sandbox eman docker://spack/centos6:latest
[illya@rockylinux ~]$ sudo singularity shell --writable eman
 
Singularity> yum install fftw2-devel cmake gsl-devel libpng-devel libtiff-devel hdf5-devel openjpeg-devel qt3-devel python-devel xorg-x11-fonts-Type1.noarch -y
Singularity> mkdir -p /apps/src
Singularity> cd /apps/src/
Singularity> tar xf ~/eman-src-1.9.tar2.gz
Singularity> cd eman/
Singularity> mkdir build
Singularity> cd build
Singularity> cmake  -DEMAN_INSTALL_PREFIX=/apps/eman ..
Singularity> make
Singularity> make install
 
[illya@rockylinux ~]$ sudo vi eman/environment
#!/bin/sh
# Custom environment shell code should follow
export PATH=/apps/eman/bin:$PATH
export EMANDIR=/apps/eman
export LD_LIBRARY_PATH=/apps/eman/lib
 
[illya@rockylinux ~]$

使ってみる

[illya@rockylinux ~]$ singularity shell eman
Singularity>
Singularity> eman

sifを作ってみる

[illya@rockylinux ~]$ cat eman.def
BootStrap: docker
From: spack/centos6:latest
 
%files
  /Public/em/eman-src-1.9.tar2.gz /usr/src
 
%post
  yum install fftw2-devel cmake gsl-devel libpng-devel libtiff-devel hdf5-devel openjpeg-devel qt3-devel python-devel xorg-x11-fonts-Type1 -y
  mkdir -p /apps/src
  cd /apps/src
  tar xf /usr/src/eman-src-1.9.tar2.gz
  cd eman
  mkdir build
  cd build
  cmake -DEMAN_INSTALL_PREFIX=/apps/EMAN ..
  make
  make install
 
%environment
  export PATH=/apps/EMAN/bin:$PATH
  export LD_LIBRARY_PATH=/apps/EMAN/lib:$LD_LIBRARY_PATH
  export EMANDIR=/apps/EMAN
[illya@rockylinux ~]$
 
[illya@rockylinux ~]$ singularity build -f eman-1.9.sif eman.def
 
[illya@rockylinux ~]$ ls -lh eman-1.9.sif
-rwxr-xr-x. 1 illya illya 300M Jul  8 05:50 eman-1.9.sif     <--- 300MBほどです
[illya@rockylinux ~]$
 
[illya@rockylinux ~]$ singularity shell eman-1.9.sif
Singularity> eman
EMAN 1.9 ($Date: 2009/02/18 05:12:22 $).
Run 'eman help' for detailed help.
Singularity>

2022y07m08d_055211977.png


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2022-07-08 (金) 05:53:57 (78d)