借助 code-server 和 ngrok 给 Kaggle 上个在线版的终端,这样修改文件就很方便。

Notebook:

!curl -fsSL https://code-server.dev/install.sh | sh
!pip install pyngrok
!ngrok config add-authtoken ?authtoken_here?
# run the cell then stop it if you want to generate the password
# there is no password for default
# !code-server 
!sed -i.bak 's/auth: password/auth: none/' ~/.config/code-server/config.yaml
# !cat /root/.config/code-server/config.yaml | grep password

import subprocess
def iframe_thread():
    p = subprocess.Popen(["code-server"], stdout=subprocess.PIPE)

from threading import Thread
Thread(target=iframe_thread, daemon=True).start()

!ngrok http --domain=?your_ngrok_domain? 8080

Kaggle 好像不允许直接 ssh 连接,在线终端应该没事?

缺少 so 文件直接删除 conda 里的即可,系统一般是正常的,conda 比较残废罢了。

可能用蚁剑管理也可以,不过暂时 cs 够用了,先凑合一下。