Environment modules을 설정하고 사용합니다.
Rocky 9.5
소프트웨어 환경을 동적으로 관리하고 사용자 세션에서 필요한 프로그램이나 라이브러리의 버전을 설정할 수 있게 해주는 Unix/Linux 시스템의 유틸리티입니다.
# dnf -y install environment-modules
# module avail
---------- /usr/share/Modules/modulefiles ----------
dot module-git module-info modules null use.own
Key:
modulepath
# echo $MODULEPATH
/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
# mkdir /apps/modulefiles
# vim /etc/environment-modules/modulespath
#/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
/apps/modulefiles
# su –
# echo $MODULEPATH
/appss/modulefiles
# mkdir /apps/modulefiles/python
# vim /apps/modulefiles/python/3.12.8
#%Module
# Module description
proc ModulesHelp { } {
puts stderr "This module sets up the environment for Python 3.12.8."
}
module-whatis "Sets up Python 3.12.8 environment."
# Set PYTHONHOME
setenv PYTHONHOME /apps/python/3.12.8
# Prepend to PATH
prepend-path PATH $env(PYTHONHOME)/bin
# Prepend to LD_LIBRARY_PATH
prepend-path LD_LIBRARY_PATH $env(PYTHONHOME)/lib
# vim /apps/modulefiles/python/3.13.1
#%Module
# Module description
proc ModulesHelp { } {
puts stderr "This module sets up the environment for Python 3.13.1."
}
module-whatis "Sets up Python 3.13.1 environment."
# Set PYTHONHOME
set PYTHONHOME /apps/python/3.13.1
# Append to PATH
append-path PATH $PYTHONHOME/bin
# Append to LD_LIBRARY_PATH
append-path LD_LIBRARY_PATH $PYTHONHOME/lib
# module avail python
-------------------- /apps/modulefiles --------------------
python/3.12.8 python/3.13.1
# module help python/3.12.8
-------------------------------------------------------------------
Module Specific Help for /apps/modulefiles/python/3.12.8:
This module sets up the environment for Python 3.12.8.
-------------------------------------------------------------------
# module help python/3.13.1
-------------------------------------------------------------------
Module Specific Help for /apps/modulefiles/python/3.13.1:
This module sets up the environment for Python 3.13.1.
-------------------------------------------------------------------
# module whatis
-------------------- /apps/modulefiles --------------------
python/3.12.8: Sets up Python 3.12.8 environment.
python/3.13.1: Sets up Python 3.13.1 environment.
# module load python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.12.8
# which python
/apps/python/3.12.8/bin/python
# module load python/3.13.1
# module list
Currently Loaded Modulefiles:
1) python/3.12.8 2) python/3.13.1
# which python
/apps/python/3.12.8/bin/python
# echo $PATH
/apps/python/3.12.8/bin:/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/apps/python/3.13.1/bin
# module unload python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.13.1
# module load python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.13.1 2) python/3.12.8
# module purge
# module list
No Modulefiles Currently Loaded.
# vim /etc/environment-modules/initrc
+ module load python/3.12.8
# su – seuheu
Loading python/3.12.8
# python –version
Python 3.12.8
# vim /etc/environment-modules/siteconfig.tcl
prepend-path PATH /apps/python/3.13.1/bin
prepend-path LD_LIBRARY_PATH /apps/python/3.13.1/lib
# su – seuheu
$ echo $PATH
/home/seuheu/.local/bin:/home/seuheu/bin:/usr/share/Modules/bin:/apps/python/3.12.8/bin:/apps/python/3.13.1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
1. 개요 Rocky Linux는 엔터프라이즈 환경에서 사용되는 RHEL(Red Hat Enterprise Linux)과 완전히 호환되는 오픈소스 Linux…
https://youtu.be/XwG4jBWakzQ 1. 개요 Supermicro IPMIView는 Supermicro에서 제공하는 IPMI (Intelligent Platform Management Interface) 기반의 통합 관리…
1. 개요 이 문서는 두 개의 NIC (enp5s0f0, enp5s0f1)를 bonding(active-backup) 방식으로 구성하고, 해당 bond 장치를 브리지(br0) 와 연결하여 KVM 가상머신에서…
1. 개요 KVM에서 NVIDIA GPU를 Passthrough 설정하여 VM에 할당할 때 RmInitAdapter failed 오류를 자주 접하게…
1. 개요 Proxmox에서 pGPU(Physical GPU)와 vGPU(Virtual GPU)를 동일한 서버에서 동시에 사용하는 방법을 정리합니다. 2. 버전…
1. 개요 Proxmox에서 vGPU를 설정하는 방법을 정리합니다. 2. 버전 Proxmox 8.2 3. vGPU란? vGPU(Virtual GPU)는…