目录
环境依赖
sudo yum update -y && \
yum groupinstall -y 'Development Tools' && \
yum install -y \
openssl-devel \
libuuid-devel \
libseccomp-devel \
wget \
squashfs-tools\
cryptsetup
golang安装
sudo export VERSION=1.16.5 OS=linux ARCH=amd64 && \
wget https://studygolang.com/dl/golang/go$VERSION.$OS-$ARCH.tar.gz && \
tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
rm go$VERSION.$OS-$ARCH.tar.gz
echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \
echo 'export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin' >> ~/.bashrc && \
source ~/.bashrc
Singularity安装
export VERSION=3.8.0 && export REL=rc.2 && # adjust this as necessary \
wget https://github.com/hpcng/singularity/releases/download/v${VERSION}-${REL}/singularity-${VERSION}-${REL}.tar.gz && \
tar -xzf singularity-${VERSION}-${REL}.tar.gz && \
cd singularity
sudo ./mconfig && \
make -C ./builddir && \
make -C ./builddir install
直接在默认路径上编译会报错:
checking: host Go compiler (at least version 1.13)... not found!
删除整个singularity目录,重新解压安装(普通用户即可):
export VERSION=3.8.0
tar -xzf singularity-ce-${VERSION}.tar.gz
cd singularity-ce-${VERSION}
./mconfig --prefix=/opt/singularity/${VERSION}
cd builddir/
make && make install
echo "export PATH=/opt/singularity/${VERSION}/bin:\$PATH" >> ~/.bashrc
常用命令
singularity -h
singularity build #构建镜像
singularity run #容器内启动执行脚本
singularity exec #镜像内执行命令
singularity shell #执行一个 shell 脚本
标签:tar,Centos,gz,VERSION,export,&&,Singularity,安装,singularity From: https://www.cnblogs.com/miyuanbiotech/p/17408300.htmlRef:
https://www.jianshu.com/p/b081c9622dda
https://www.jianshu.com/p/b46ee066806b