
我正在使用 Docker Desktop(4.16.3) 和泥。當我運行時slurmd
,我收到以下錯誤:
common_cgroup_instantiate: unable to create cgroup '/sys/fs/cgroup/freezer/slurm' : Read-only file system
unable to build slurm cgroup for ns freezer: Read-only file system
unable to create slurm freezer xcgroup
Couldn't load specified plugin name for proctrack/cgroup: Plugin init() callback failed
cannot create proctrack context for proctrack/cgroup
error: slurmd initialization failed
我到處尋找解決方案,但沒有成功找到答案。
一種解決方案涉及將以下命令systemd.unified_cgroup_hierarchy=1
與 grub 一起使用。但是 grub 並不存在於基礎鏡像中,而且它似乎受到警告,因為它以某種方式與systemd
我還嘗試了製作丟失目錄並更改權限的笨方法,但我仍然收到只讀錯誤:
RUN mkdir -p /sys/fs/cgroup/freezer/slurm:
#0 mkdir: cannot create directory '/sys/fs/cgroup/freezer/slurm': Read-only file system
任何幫助是極大的讚賞。
答案1
嘗試將主機上的磁碟區對應/sys/fs/cgroup
到容器。
如下圖所示。
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup