CentOS7でwarpが動かなかったので作った
定義ファイルを下記のようにしてます
「warp=2.0.0dev36」とバージョン指定を行ってます。
ほかのversionらは https://anaconda.org/channels/warpem/packages/warp/overview
で確認できます
Bootstrap: docker
From: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
%post
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget bzip2 ca-certificates git \
libglib2.0-0 libxext6 libsm6 libxrender1 \
libgl1 libgomp1 \
&& apt-get clean
wget -O /tmp/Miniforge3.sh \
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash /tmp/Miniforge3.sh -b -p /opt/conda
. /opt/conda/etc/profile.d/conda.sh
conda create -y -n warp \
warp=2.0.0dev36 \
-c warpem \
-c nvidia/label/cuda-11.8.0 \
-c pytorch \
-c conda-forge
conda clean -afy
%environment
export PATH=/opt/conda/envs/warp/bin:/opt/conda/bin:$PATH
export LD_LIBRARY_PATH=/opt/conda/envs/warp/lib:$LD_LIBRARY_PATH
%runscript
exec "$@"っで
[root@centos7 ~]# apptainer build warp.sif warp.def
:
:
[root@centos7 ~]# ls -lh warp.*
-rw-r--r--. 1 root root 865 Jul 4 02:27 warp.def
-rwxr-xr-x. 1 root root 10G Jul 4 02:58 warp.sif
[root@centos7 ~]#と「warp.sif」を得ました
使いかとしては
[saber@centos7 ~]$ apptainer exec --nv /apps/warp.sif WarpTools --help
[saber@centos7 ~]$ apptainer exec --nv /apps/warp.sif MTools --helpAreTomo3に既に構築版があったのでそれを採用した
IMODは今時点での最新を取得
コンテナはcuda12.4にしてます。恐らくは前述のcuda-11.8でもいいのかなと思いますが.
Bootstrap: docker
From: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
%post
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget bzip2 ca-certificates git \
libglib2.0-0 libxext6 libsm6 libxrender1 \
libgl1 libgomp1 default-jre libtiff-dev unzip tar \
&& apt-get clean
wget -O /tmp/Miniforge3.sh \
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash /tmp/Miniforge3.sh -b -p /opt/conda
. /opt/conda/etc/profile.d/conda.sh
conda create -y -n warp \
warp=2.0.0dev36 \
-c warpem \
-c nvidia/label/cuda-11.8.0 \
-c pytorch \
-c conda-forge
#conda clean -afy
wget https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_5.1.12_RHEL7-64_CUDA12.0.sh --no-check-certificate
bash imod_5.1.12_RHEL7-64_CUDA12.0.sh -dir /opt -script /opt -yes
rm -f imod_5.1.12_RHEL7-64_CUDA12.0.sh
wget -O /tmp/aretomo3.zip \
https://github.com/czimaginginstitute/AreTomo3/releases/download/v2.2.2/AreTomo3_2.2.2_07-11-2025.zip
mkdir /opt/AreTomo3
cd /opt/AreTomo3
unzip /tmp/aretomo3.zip
ln -s AreTomo3_2.2.2_07-11-2025 AreTomo3
ln -s AreTomo3_2.2.2_07-11-2025 aretomo3
ln -s AreTomo3_2.2.2_07-11-2025 aretomo
rm -f /tmp/Miniforge3.sh /tmp/aretomo3.zip
%environment
export PATH=/opt/conda/envs/warp/bin:/opt/conda/bin:/opt/imod_5.1.12/bin:/opt/AreTomo3:$PATH
export LD_LIBRARY_PATH=/opt/conda/envs/warp/lib:/opt/imod_5.1.12/lib:$LD_LIBRARY_PATH
export IMOD_DIR=/opt/imod_5.1.12
export IMOD_QTLIBDIR=/opt/imod_5.1.12/qtlib
export IMOD_PLUGIN_DIR=/opt/imod_5.1.12/lib/imodplug
export IMOD_CALIB_DIR=/opt/imod_5.1.12/autodoc
%runscript
exec "$@"