본문 바로가기
HPC

[HPC]Singularity 설치 및 사용 가이드

by Yoon_estar 2024. 12. 5.
728x90

Singularity란?

Singularity는 컨테이너 기술로, HPC(고성능 컴퓨팅) 환경에서 주로 사용됩니다. 보안성과 유연성을 제공하며, 연구 및 개발 분야에서 Docker 대안으로 자주 사용됩니다.

 

설치 환경

 

  • OS: Ubuntu 24.04
  • Singularity 버전: 최신 버전
  • 주요 패키지: Python3, Numpy, Polib 등

설치 과정

  • 시스템 업데이트
sudo apt update

 

 

  • 의존성 문제 해결
sudo apt --fix-broken install

 

 

  • Singularity 설치
sudo apt-get install singularity

Singularity 설치 확인

$ singularity --version
/usr/games/singularity:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import load_entry_point
Singularity 1.00 (commit: 2ebc2f3f2059b96885416167363bde2e27ece106)
Running under Python 3.12.3 (main, Nov  6 2024, 18:32:19) [GCC 13.2.0]
pygame 2.5.2 (SDL 2.30.0, Python 3.12.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
The error-log configured as /home/estar987/.local/share/singularity/log/error.log (lazily created when something is logged)
1.00

컨테이너 생성

# singularity build my_container.sif library://alpine:latest
/usr/games/singularity:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import load_entry_point
Singularity 1.00 (commit: 2ebc2f3f2059b96885416167363bde2e27ece106)
Running under Python 3.12.3 (main, Nov  6 2024, 18:32:19) [GCC 13.2.0]
pygame 2.5.2 (SDL 2.30.0, Python 3.12.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
The error-log configured as /root/.local/share/singularity/log/error.log (lazily created when something is logged)
VMware: No 3D enabled (0, Success).
libEGL warning: egl: failed to create dri2 screen
VMware: No 3D enabled (0, Success).
libEGL warning: egl: failed to create dri2 screen
VMware: No 3D enabled (0, Success).
libEGL warning: egl: failed to create dri2 screen
WARNING: Sound is requested, but mixer is not initialized!

컨테이너 실행

singularity exec my_container.sif echo "Hello, Singularity!"