实验室集群配置
实验室服务器是十多年前组装的,CentOS release 6.9,总共8个计算节点和一个fat01节点,含两块硬盘,存储大小分别为9T和35T。总体来说,还是满足日常的计算任务的。但是由于一些库文件实在是太旧了,所以还是谷歌了好久。简单的记录一下吧,方便之后整理。
具体过程
- 安装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,成功了!!!
- 安装jupyter ipython ,设置密码。
- 集群配置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
- 在本地cmd, 输入:ssh -t -t malab@(ip) -L 8014:localhost:8014 ssh (fat01 ip) -L 8014:127.0.0.1:8014
- 可以访问了。
![]()