背景
GCPのGCEのGPU搭載インスタンスで推論処理の入ったunicornプロセスを起動したところ [Errno 13] Permission denied: '/root/google_vm_config.lock'
のエラーが発生
環境
- Debian GNU/Linux 11
- cuda 11.8
- bitsandbytes 40.2
やったこと
GOOGLE_VM_CONFIG_LOCK_FILE
を .../bitsandbytes/cuda_setup/env_vars.py
の to_be_ignoredn追記する
参考
私の環境では、env_vars.pyは以下のpathでした /home/USER_NAME/.local/share/virtualenvs/VIRTUAL_ENV/lib/python3.10/site-packages/bitsandbytes/cuda_setup/env_vars.py
from typing import Dict
def to_be_ignored(env_var: str, value: str) -> bool:
ignorable = {
"PWD", # PWD: this is how the shell keeps track of the current working dir
"OLDPWD",
"SSH_AUTH_SOCK", # SSH stuff, therefore unrelated
"SSH_TTY",
"HOME", # Linux shell default
"TMUX", # Terminal Multiplexer
"XDG_DATA_DIRS", # XDG: Desktop environment stuff
"XDG_GREETER_DATA_DIR", # XDG: Desktop environment stuff
"XDG_RUNTIME_DIR",
"MAIL", # something related to emails
"SHELL", # binary for currently invoked shell
"DBUS_SESSION_BUS_ADDRESS", # hardware related
"PATH", # this is for finding binaries, not libraries
"LESSOPEN", # related to the `less` command
"LESSCLOSE",
"_", # current Python interpreter,
"GOOGLE_VM_CONFIG_LOCK_FILE" # ←追記
}
return env_var in ignorable
def might_contain_a_path(candidate: str) -> bool:
return "/" in candidate
~略~