Singularity๋ ๋์ปค(Docker)์ ์ ์ฌํ ์ปจํ ์ด๋(Container) ์์คํ ์ผ๋ก ๋์ปค์ ๋๊ฐ์ง ๋จ์ (ํ์ผ ์์คํ ๊ฒฉ๋ฆฌ, ์ฌ์ฉ์ ID ๋ฌธ์ )์ ํด๊ฒฐํ ์์คํ ์ผ๋ก ๋ฐฐ์น ๋ฐ์ดํฐ ์ฒ๋ฆฌ ๋ฑ์ ๋ค๋ฃจ๋ ๋ฌธ์ ์ ๋ฐ๋ผ ๋์ปค๋ฅผ ๋์ฒดํ ์ ์์ต๋๋ค.
๋ค๋ง, ๋์ปค์ ์ํ๊ณ๊ฐ ํจ์ฌ ํฌ๊ณ ๊ฐ์ฅ ๋์ธ๋ก ๊ตฌ์ถ๋์ด์๊ธฐ ๋๋ฌธ์ ์ผ๋ฐ์ ์ธ ์ปจํ ์ด๋ ์์คํ ์ ์ด์ฉํ๊ณ ์ ํ๋ ๊ฒฝ์ฐ ๋์ปค๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ฌ๋ฌ๋ชจ๋ก ๋ฐ๋์งํ ๊ฒ์ ๋๋ค.
โปSingularity๊ฐ ๋์ปค์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ๋ฐฉ๋ฒ
- ์ปจํ ์ด๋๋ ํธ์คํธ ํ์ผ ์์คํ ์ ์๋์ผ๋ก ์ก์ธ์คํ ์ ์์์ต๋๋ค( $HOME, $PWD, ๋ฐ /tmp์๋์ผ๋ก ๋ง์ดํธ๋จ).
- ์ปจํ ์ด๋๋ ํ์ฌ ์ฌ์ฉ์๋ก ์๋์ผ๋ก ์คํ๋ฉ๋๋ค.
๋ณธ ํฌ์คํ ์์๋ ์ด๋ฌํ ์ปจํ ์ด๋ ์์คํ ์ธ Singularity์ ์ค์น ๋ฐฉ๋ฒ์ ์์๋ณด๊ฒ ์ต๋๋ค. Singularity ๋ฒ์ ์ ์ต์ ๋ฒ์ ์ธ 3.8๋ก ์ ํํ์์ผ๋ฉฐ, ์์ ํ๊ฒฝ์ ์ฐ๋ถํฌ(Ubuntu) 20.04 LTS์ ๋๋ค.
1. ์์กด์ฑ ํจํค์ง ์ค์น
์ ๋ ์ฐ๋ถํฌ(Ubuntu) ํ๊ฒฝ์์ ์ฌ์ฉํ์๊ธฐ ๋๋ฌธ์ apt-get
์ ์ด์ฉํ์ฌ ์์กด์ฑ ํจํค์ง๋ฅผ ์ค์นํ์์ต๋๋ค.
sudo apt-get update && sudo apt-get install -y \ build-essential \ libssl-dev \ uuid-dev \ libgpgme11-dev \ squashfs-tools \ libseccomp-dev \ wget \ pkg-config \ git \ cryptsetup
2. Go ์ค์น
Go๋ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด์ ํ๋๋ก, Singularity๋ฅผ ์ค์นํ๊ธฐ ์ํด์๋ Go๋ฅผ ์ค์นํด์ผ ํฉ๋๋ค. Go ์น์ฌ์ดํธ์์ ์ง์ ๋ณด๋ฉด์ ์ค์นํด๋ ๋ฉ๋๋ค๋ง, ์ต์ ๋ฒ์ ์ด Singularity ์ค์น ๋งค๋ด์ผ๊ณผ ๋ฒ์ ์ด ๋ง์ง ์์ต๋๋ค. ๊ทธ๋์ ์๋์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉํด์ ์ค์นํ์๊ธฐ๋ฅผ ์ถ์ฒ๋๋ฆฝ๋๋ค. Go ์ค์น ๋ฐฉ๋ฒ ์์ํฉ๋๋ค.
export VERSION=1.16.4 OS=linux ARCH=amd64 && \ # Replace the values as needed wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \ # Downloads the required Go package sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \ # Extracts the archive rm go$VERSION.$OS-$ARCH.tar.gz # Deletes the ``tar`` file
์ด์ ๊ฐ์ด ํ๋ฉด /usr/local ๋๋ ํ ๋ฆฌ ์๋์ ๊ฒฝ๋ก์ go ๋๋ ํ ๋ฆฌ๊ฐ ์์ฑ๋ฉ๋๋ค. ์ด๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ํ๊ฒฝ๋ณ์ ์ค์ ์ ํด์ฃผ์ด์ผ ํ๋๋ฐ, home ๊ฒฝ๋ก์ .bashrc์ ์๋์ ๊ฐ์ ๋ช ๋ น์ด๋ฅผ ํตํด ํ๋ฒ์ ํ๊ฒฝ๋ณ์๋ฅผ ์ค์ ํด์ค๋๋ค.
echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc && \ source ~/.bashrc
ํน์ Go์ ๋ค๋ฅธ ๋ฒ์ ์ด ์ค์น๋์ด ์์ด์ ์ถฉ๋์ด ๋ ๊ฒฝ์ฐ ์๋์ ๋ช ๋ น์ด๋ฅผ ํตํด go๋ฅผ ์์ ์ญ์ ํ์๊ธฐ ๋ฐ๋๋๋ค. ํด๋น ๋ช ๋ น์ด๊ฐ ์ํ ๋ ๋ค์ ์์ ์์๋๋ก ๋ค์ ํ๋ฒ ์ํํ์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
rm -rf /usr/local/go
3. Singularity ์ค์น
์ด์ Singularity๋ฅผ ์ค์นํ ์ฐจ๋ก์ ๋๋ค. ์์ ์์กด์ฑ ์๋ ํจํค์ง๋ค๊ณผ Go๊ฐ ์ ๋๋ก ์ค์น๋์๋ค๋ฉด, ์๋์ ๋ช ๋ น์ด๋ก Singularity๋ฅผ ์ค์นํ ์ ์์ต๋๋ค.
export VERSION=3.8.1 && # adjust this as necessary \ wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz && \ tar -xzf singularity-ce-${VERSION}.tar.gz && \ cd singularity-ce-${VERSION}
์ฌ๊ธฐ๊น์ง ์๋ฃ๋๋ฉด, Singularity ์ ์ฅ์(Repository)์์ ์์ค(Source)๋ฅผ ๋ฐ์์จ ์ํ์ ๋๋ค. ์์ค ์ํ์ด๊ธฐ ๋๋ฌธ์ ์คํํ์ผ์ ๋ง๋ค๊ธฐ ์ํด ์ปดํ์ผ์ด ํ์ํฉ๋๋ค. ์์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ค๋ฉด singularity ๊ฒฝ๋ก์ ์์นํ๊ณ ์๊ธฐ ๋๋ฌธ์ ๋ฐ๋ก ์๋์ ๋ช ๋ น์ด๋ฅผ ์คํํด์ค๋๋ค.
./mconfig && \ make -C builddir && \ sudo make -C builddir install
์ฌ๊ธฐ๊น์ง ์๋ฃ๊ฐ ๋์๋ค๋ฉด, bash ์ํ์์ singularity ์ค์น ์ฌ๋ถ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.
singularity --version
์ด๋ ๊ฒ ์ ๋ ฅํ์ ๋ ์๋์ ๊ฐ์ด ๋์ค๋ฉด ์ ์ ์ค์น๊ฐ ์๋ฃ๋ ๊ฒ์ ๋๋ค.
singularity-ce version 3.8.1
์ฐธ๊ณ ์ฌ์ดํธ
1. Singularity ์ค์น ๋งค๋ด์ผ: https://sylabs.io/guides/3.8/user-guide/quick_start.html#quick-installation-steps
Quick Start — SingularityCE User Guide 3.8 documentation
SingularityCE v3 and above is written primarily in Go, so you will need Go installed to compile it from source. Note If you have previously installed Go from a download, rather than an operating system package, you should remove your go directory, e.g. rm
sylabs.io
2. Go ์ค์น ๊ด๋ จ: https://golang.org/doc/install
Download and install - The Go Programming Language
Download and install Download and install Go quickly with the steps described here. For other content on installing, you might be interested in: 1. Go download. Click the button below to download the Go installer. Download Go Don't see your operating syste
golang.org
3. Singularity ๊ด๋ จ: https://sylabs.io/singularity/
Singularity
Singularity provides a single universal on-ramp from developers’ workstations to local resources, the cloud, and all the way to edge.
sylabs.io
4. Go ๊ด๋ จ: https://golang.org/
The Go Programming Language
Download Go Binary distributions available for Linux, macOS, Windows, and more. // You can edit this code! // Click here and start typing. package main import "fmt" func main() { fmt.Println("Hello, ไธ็") } Hello, World! Conway's Game of Life Fibonacci
golang.org
๋๊ธ