# 创建用于存放镜像的目录
mkdir ~/containers
cd ~/containers
# 加载 Apptainer 模块
module load apptainer
# 通过毫秒镜像加速拉取 Rocker RStudio 镜像到当前目录
apptainer pull rstudio_latest.sif docker://docker.1ms.run/rocker/rstudio:latest
# 将镜像解包为沙盒
apptainer build --sandbox rstudio_sandbox/ rstudio_latest.sif
# 用沙盒启动(--writable 使其可写)
apptainer exec \
--writable \
rstudio_sandbox/ \
rserver \
--auth-none=0 \
--auth-pam-helper-path=pam-helper \
--www-address=0.0.0.0 \
--www-port=8787 \
--server-user=yourusername
# 申请计算节点
srun --pty --partition=qdhcnormal --cpus-per-task=10 --mem=70G --time=10:00:00 bash
# 查看申请到的节点名称
hostname
# 转发 dcu38 节点上的 8888 端口到本地的 8888 端口上
ssh -p 65032 -L 8787:dcu79:8787 zhangjing666@qdeshell.hpccube.com -i "C:\Users\Jamaskii\Documents\sshkeys\zhangjing666_qdeshell.hpccube.com_RsaKeyExpireTime_2026-12-02_10-10-36.txt"
评论 (0)