zl程序教程

您现在的位置是:首页 >  工具

当前栏目

docker velocyto.r

2023-09-14 09:09:48 时间

安装docker之前对原生系统的要求 :boost openmp

安装docker
然后进行下面的命令

1.安装镜像
nohup docker build -t mydockerfile . &

确保xshell关闭 远程仍然运行
nohup 命令 &
例子:
nohup docker build -t velocyto . &

2.查看镜像 和所有容器
docker ps -a
在这里插入图片描述

3.1以root用户进入容器
sudo docker exec -it -u root cc0e2ec3eec8 /bin/bash
在这里插入图片描述

3.2以普通用户进入容器
sudo docker run -it vetocyto.r-images-5.17

docker 容器背景运行

或者先运行images docker run -it 05ceab6cddb8
容器内的目录结构 ls -al
在这里插入图片描述
4.进入R软件

R

在这里插入图片描述

5.r软件中的r包位置 与容器中文件目录的关系

5.1.进入容器的home目录
cd ~

5.2.查看home下面的文件
ls -la
在这里插入图片描述
5.3 返回根目录

root@cc0e2ec3eec8:~# cd ..
root@cc0e2ec3eec8:/# ls

5.4 查看根目录下面的的所有文件目录 (即查看容器的文件结构
ls
ls -lha
在这里插入图片描述
5.5如果是以root身份进入容器的,那么R包的安装位置在

usr目录下面

> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/local/lib/R/library"     
> quit()

root@cc0e2ec3eec8:/# cd root/.
./             ../            .bash_history  .bashrc        .profile       .texlive2016/  
root@cc0e2ec3eec8:/# ls
bin  boot  dev	etc  home  lib	lib64  media  mnt  opt	proc  root  run  sbin  srv  sys  tmp  usr  var
root@cc0e2ec3eec8:/# cd usr/local/lib/R/
bin/          COPYING       doc/          etc/          include/      lib/          library/      modules/      share/        site-library/ SVN-REVISION  
root@cc0e2ec3eec8:/# cd usr/local/lib/R/site-library/

5.6 root用户的.bashrc文件在

root@cc0e2ec3eec8:~# cd /root/.
./             ../            .bash_history  .bashrc        .profile       .texlive2016/  
root@cc0e2ec3eec8:~# cd /root/.
root@cc0e2ec3eec8:~# 

即 root用户的家目录下
在这里插入图片描述
/ 表示根目录
~表示家目录

  1. 进入R,安装r包
    .libPaths()
    library(devtools)
    install_github(“velocyto-team/velocyto.R”)
    library(velocyto.R)
root@cc0e2ec3eec8:/home/user# R

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(devtools)
> install_github("velocyto-team/velocyto.R")

r中安装velocyto.R出现问题
https://stackoverflow.com/questions/69181778/error-dependency-rcpparmadillo-is-not-available-for-package

** libs
g++ -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG  -I"/usr/local/lib/R/site-library/Rcpp/include" -I/usr/local/include  -I../inst/include -fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppArmadillo.cpp -o RcppArmadillo.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
/usr/local/lib/R/etc/Makeconf:168: recipe for target 'RcppArmadillo.o' failed
make: *** [RcppArmadillo.o] Error 4
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/usr/local/lib/R/site-library/RcppArmadillo’
Installation failed: Command failed (1)
'/usr/local/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/RtmpXv2HGg/devtools14dc50399fa7/velocyto-team-velocyto.R-83e6ed9'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

ERROR: dependency ‘RcppArmadillo’ is not available for package ‘velocyto.R’
* removing ‘/usr/local/lib/R/site-library/velocyto.R’
Installation failed: Command failed (1)

于是在r中先安装 install.packages(“RcppArmadillo”)

install.packages("RcppArmadillo")

https://www.thisprogrammingthing.com/2015/fixing-g-internal-compiler-error-killed-program-cc1plus/

I was trying to install nodejs in a VM and I received the following error:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[1]: *** [/usr/local/src/node-v4.2.1/out/Release/obj.target/v8_base/deps/v8/src/hydrogen.o] Error 4
make[1]: Leaving directory `/usr/local/src/node-v4.2.1/out'
make: *** [node] Error 2
I traced this down to being not enough memory and after I increased the RAM to 1024MB it worked fine. I'm amazed node needs so much to compile.

I traced this down to being not enough memory and after I increased the RAM to 1024MB it worked fine. I’m amazed node needs so much to compile.