我嘗試在遠程計算機上運行基于 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
提交
取消