随笔1215 docker r+python

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了随笔1215 docker r+python相关的知识,希望对你有一定的参考价值。

遍地的坑啊

 

目标 搭建docker sparkR

小目标 rpy2 fbprophet python3

 

坑1:

rpy2 如果要求python支持 需要 R

解决方案:去下载r

 

坑2:

ubuntu的不能下载latest 版本的 R 如果直接 

apt-get update
apt-get install r-base

  

会直接下载到3.1.1 而python3下的 rpy2要求 R -version >= 3.3.x

解决方案:https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-16-04-2

 

坑3:

gpg: requesting key E084DAB9 from hkp server keyserver.ubuntu.com
gpg: key E084DAB9: public key "Michael Rutter <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
/bin/sh: 1: add-apt-repository: not found

add-apt-repository 无效

 

解决方案:依赖问题 先运行 apt-get update

 

坑4:

gpg: requesting key E084DAB9 from hkp server keyserver.ubuntu.com
gpg: key E084DAB9: public key "Michael Rutter <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
E: The method driver /usr/lib/apt/methods/https could not be found.
E: Failed to fetch https://cran.rstudio.com/bin/linux/ubuntu/xenial/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

  

解决方案:待解决

 

branch1:

尝试直接加入key之后下载r

FROM ubuntu
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9  && apt-get update  && apt-get install -y  r-base r-base-dev

  

这个是最新的稳定版本 3.2.3显然不符合标准。。。

话说运维的活 感觉一天一天都在编译失败中读过 那是多么绝望又痛苦的生活啊

以上是关于随笔1215 docker r+python的主要内容,如果未能解决你的问题,请参考以下文章

随笔-Docker

python随笔:range

Python随笔

docker随笔:交叉编译工具链 docker镜像的制作

docker随笔:交叉编译工具链 docker镜像的制作

denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock.......(代码片