我尝试在远程计算机上运行基于 python3 的 Singularity 图像,但出现以下错误,而在其他计算机上则不会出现此错误:singularity exec --nv --no-home --bind data/:/data/ image/ scripts/train.sh+ singularity exec --nv --no-home --bind data/:/data/ image/ scripts/train.shWARNING: skipping mount of sysfs: no such file or directoryscripts/train.sh: line 8: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8): No such file or directoryPython path configuration: PYTHONHOME = (not set) PYTHONPATH = '/usr/local/bin/python' program name = '/usr/local/bin/python' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/usr/local/bin/python' sys.base_prefix = '/usr/local' sys.base_exec_prefix = '/usr/local' sys.executable = '/usr/local/bin/python' sys.prefix = '/usr/local' sys.exec_prefix = '/usr/local' sys.path = [ '/usr/local/bin/python', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', ]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedLookupError: no codec search functions registered: can't find encodingCurrent thread 0x00007f628ee51740 (most recent call first):<no Python frame>我的定义文件如下所示:Bootstrap: dockerFrom: python:3%post apt-get update -y apt-get install -y git pip install torch torchvision git clone https://github.com/NVIDIA/apex cd apex pip install -v --no-cache-dir ./%runscript echo "Running nnunet container..."我该如何修复这个错误?为什么图像在不同的机器上表现不一样?
1 回答
一只斗牛犬
TA贡献1784条经验 获得超2个赞
这通常是由于环境变量在没有注意到的情况下被传递或没有传递到容器。为了确保这不是问题,您可以使用-e
或--cleanenv
。这将防止任何没有前缀的变量SINGULARITYENV_
加载到容器中。
也就是说,警告WARNING: skipping mount of sysfs: no such file or directory
也令人担忧:奇点无法安装/sys
到图像中,因为它不存在于主机服务器上。这个特定的 python 错误似乎也是 Windows 10 特有的。Singularity 目前不支持 Windows,即使有 WSL2 的魔力。
添加回答
举报
0/150
提交
取消