gpt4 book ai didi

python - 奇点容器中的错误 "no free space in/var/cache/apt/archives",但磁盘未满

转载 作者:行者123 更新时间:2023-12-04 19:05:10 31 4
gpt4 key购买 nike

我正在尝试重现旧研究论文的结果,并且需要 tp 使用 nvidia CUDA 9.0 和 torch 1.2.0 运行奇异容器。
在本地我有 Ubuntu 20.04 作为我运行的虚拟机 singularity build .我关注 guide安装较旧的 CUDA 版本。
这是配方文件

#header
Bootstrap: docker
From: nvidia/cuda:9.0-runtime-ubuntu16.04

#Sections

%files
/home/timaie/rkn_tcml/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
/home/timaie/rkn_tcml/RKN/*

%post

# necessary dependencies
pip install numpy scipy scikit-learn biopython pandas

dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb

apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
apt-get autoclean
apt-get autoremove
apt-get update

export CUDA_HOME="/usr/local/cuda-9.0"
export TORCH_EXTENSIONS_DIR="$PWD/tmp"
export PYTHONPATH=$PWD:$PYTHONPATH

%runscript
cd experiments
python train_scop.py --pooling max --embedding blosum62 --kmer-size 14 --alternating --sigma 0.4 --tfid 0
它运行良好并为我提供了一个 image.simg 文件。然后我尝试通过 sudo singularity exec image.simg apt-get install cuda 安装 cuda产生以下错误
0 upgraded, 823 newly installed, 0 to remove and 1 not upgraded.
Need to get 2661 MB of archives.
After this operation, 6822 MB of additional disk space will be used.
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
W: chown to _apt:root of directory /var/cache/apt/archives/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/cache/apt/archives/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: Not using locking for read only lock file /var/cache/apt/archives/lock
E: You don't have enough free space in /var/cache/apt/archives/.
我在 docker here 中读到了类似的问题但我不知道类似于 docker system prune 的内容为奇点。
我还尝试通过 apt autoremove 释放空间和 apt autoclean没有任何成功。
磁盘上应该有足够的空间来运行 df -H
Filesystem      Size  Used Avail Use% Mounted on
udev 2,1G 0 2,1G 0% /dev
tmpfs 412M 1,4M 411M 1% /run
/dev/sda5 54G 19G 33G 36% /
tmpfs 2,1G 0 2,1G 0% /dev/shm
tmpfs 5,3M 4,1k 5,3M 1% /run/lock
tmpfs 2,1G 0 2,1G 0% /sys/fs/cgroup
/dev/loop0 132k 132k 0 100% /snap/bare/5
/dev/loop1 66M 66M 0 100% /snap/core20/1328
/dev/loop2 261M 261M 0 100% /snap/gnome-3-38-2004/99
/dev/loop3 66M 66M 0 100% /snap/core20/1405
/dev/loop4 69M 69M 0 100% /snap/gtk-common-themes/1519
/dev/loop5 46M 46M 0 100% /snap/snapd/15177
/dev/loop6 57M 57M 0 100% /snap/snap-store/558
/dev/loop7 46M 46M 0 100% /snap/snapd/14978
/dev/sda1 536M 4,1k 536M 1% /boot/efi
tmpfs 412M 25k 412M 1% /run/user/1000
有谁知道问题出在我的本地 Ubuntu 上,还是与 nvidia docker 镜像有关?
感谢您的任何澄清。

最佳答案

overview 中所述singularity build的部分文件

build can produce containers in two different formats that can be specified as follows.

  • compressed read-only Singularity Image File (SIF) format suitable for production (default)
  • writable (ch)root directory called a sandbox for interactive development (--sandbox option)

添加 --sandbox应该使系统文件可写,这应该可以解决您的问题。
理想情况下,我建议添加任何 apt-get install%post 的命令配方文件中的部分。

关于python - 奇点容器中的错误 "no free space in/var/cache/apt/archives",但磁盘未满,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71869754/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com