0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GCPで動かしているコンテナでPermissionError: [Errno 13] Permission denied: '/root/google_vm_config.lock' が出たときの対処法

Posted at

PermissionError: [Errno 13] Permission denied: '/root/google_vm_config.lock' が出たときの対処法

GCPのコンテナで機械学習の処理を動かしていると遭遇したエラーについてメモです。

結論

lib/python3.10/site-packages/bitsandbytes/cuda_setup/env_vars.py
のパスにあるignorableの中にGOOGLE_VM_CONFIG_LOCK_FILEを加えることで解決できます。

以下のように記述します。

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",
        "GOOGLE_VM_CONFIG_LOCK_FILE", # ここだよ!!
        "_",  # current Python interpreter
    }
    return env_var in ignorable

env_vars.pyの場所は環境によって異なると思うので、findコマンドを使用するなどして、自分がライブラリをインストールした先のenv_vars.pyを編集するようにしてください。

参照

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?