在沙盒根目录下
# ls .singularity.d/env/ 01-base.sh 90-environment.sh 95-apps.sh 99-runtimevars.sh 10-docker2singularity.sh 94-appsbase.sh 99-base.sh
修改环境变量文件
# vim .singularity.d/env/90-environment.sh #!/bin/sh # Custom environment shell code should follow export LD_LIBRARY_PATH=/qt6/Tools/QtCreator/lib/Qt/lib:$LD_LIBRARY_PATH export PATH=/Trodes_2-3-2:$PATH
另一种思路是,写一个export 环境变量的bash脚本,在要执行的命令(非二进制)最前面执行这个脚本。
标签:environment,sandbox,sh,export,PATH,singularity,沙盒,环境变量 From: https://www.cnblogs.com/1016391912pm/p/16636101.html