使用t2.micro
/t3.micro
和进行测试Ubuntu 22.04.3 LTS
。起初我以为这是存储限制,但我增加到了 30GB。
重现它的步骤:
- 创建实例
- 执行 和 的更新和
apt
升级apt-get
- 安装 pip
sudo apt install python3-pip
pip install sentence-transformers
当到达这一步时它崩溃了:
Downloading nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cublas-cu12==12.1.3.1 (from torch>=1.6.0->sentence-transformers)
Downloading nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 410.6/410.6 MB 67.4 MB/s eta 0:00:01Killed
日志错误:
Out of memory: Killed process 1211 (python) total-vm:1024532kB, anon-rss:456116kB, file-rss:2772kB, shmem-rss:0kB, UID:1000 pgtables:1492kB oom_score_adj:0
[ 226.612189] Out of memory: Killed process 2067 (python) total-vm:996224kB, anon-rss:450684kB, file-rss:2560kB, shmem-rss:0kB, UID:1000 pgtables:1516kB oom_score_adj:0