实验室集群配置

实验室服务器是十多年前组装的,CentOS release 6.9,总共8个计算节点和一个fat01节点,含两块硬盘,存储大小分别为9T和35T。总体来说,还是满足日常的计算任务的。但是由于一些库文件实在是太旧了,所以还是谷歌了好久。简单的记录一下吧,方便之后整理。

具体过程

  1. 安装R
点击查看代码
a.配置conda镜像源
vim ~/.condrc
#将下列镜像直接粘贴进去就好,https -> http
channels:
  - defaults
show_channel_urls: true
default_channels: 
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

b. 创建虚拟环境
conda create -n R 
source activate R

c. 安装r-4.0  #安装好的r4.0.5有时候打开会变成r3.6.1,我们需要删除原本的R。
conda install -c conda-forge r-base=4.0
2. 安装R包
点击查看代码
a. 修改镜像源文件
file.edit('~/.Rprofile')
#直接粘贴
options(repos='http://cran.rstudio.com/')
options("repos" = c(CRAN="http://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
options(repos=structure(c(CRAN="http://mirrors.tuna.tsinghua.edu.cn/CRAN/")))

b. 安装并运行IRkernel
install.packages('IRkernel')
IRkernel::installspec()

c. 安装Seurat 
install.packages('Seurat')
# 报错:Installing the R-package "rgeos" on linux: geos-config not found or not executable
# 更新python到3.7;
# conda install r-rgeos,成功了!!!
  1. 安装jupyter ipython ,设置密码。
  2. 集群配置jupyter notebook # 参考链接:https://zhuanlan.zhihu.com/p/451185184
点击查看代码
screen -S jupyter
jupyter-lab --no-browser --port=8014 --ip=127.0.0.1
ctrl + A + D
  1. 在本地cmd, 输入:ssh -t -t malab@(ip) -L 8014:localhost:8014 ssh (fat01 ip) -L 8014:127.0.0.1:8014
  2. 可以访问了。
posted on   Bonjour_!  阅读(512)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具



点击右上角即可分享
微信分享提示