简体   繁体   English

在Docker容器中绘图时Jupyter R崩溃

[英]Jupyter R crashes when plotting in docker container

I am trying to set up Jupyter using Docker. 我正在尝试使用Docker设置Jupyter。 I would like to provide multiple languages kernels (python, scala, R etc.) Now it seems work for others but R. Everytime I execute a 'plot' function, the browser will tell me "The kernel appears to have died. It will restart automatically" 我想提供多种语言的内核(python,scala,R等),现在看来对其他人也有效,但R除外。每次我执行“绘图”功能时,浏览器都会告诉我“内核似乎已经死亡。它将自动重启”

And the error message in log is: 并且日志中的错误消息是:

 ***caught segfault ***
 address 0x35da0, cause 'memory not mapped'
 Traceback:
 1: png(tf, width, height, "in", pointsize, bg, res, antialias = antialias)
 2: dev.cb(tf)
 3: repr_recordedplot_generic(obj, ".png", TRUE, function(tf) png(tf, width, height, "in", pointsize, bg, res, antialias = antialias))
 4: repr_png.recordedplot(plotobj)
 5: mime2repr[mime]
 6: doTryCatch(return(expr), name, parentenv, handler)
 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 8: tryCatchList(expr, classes, parentenv, handlers)
 9: tryCatch({ formats[[mime]] <- mime2repr[mime]}, error = handle_error)
 10: send_plot(last_recorded_plot)
 11: executor$execute(msg)
 12: handle_shell()
 13: kernel$run()
 14: IRkernel::main()
 aborting ... 
 [I 2016-06-08 19:41:02.360 XX restarter:103] KernelRestarter: restarting kernel (1/5)
 WARNING:root:kernel XXXXXXXXXXXXXXXXXX restarted

If I execute a function of png() or jpeg() from the browser (Google Chrome) first, then plot() function could be executed successfully. 如果我先从浏览器(Google Chrome)执行png()jpeg() plot()函数,则plot()函数可能会成功执行。 I don't know why this happens, what will be changed after running png() or jpeg() . 我不知道为什么会这样,运行png()jpeg()后会发生什么变化。 Has anyone met similar issues in either Jupyter or R? 是否有人在Jupyter或R中遇到过类似的问题?

This ended up avoiding using conda while downloading/installing the R packages. 最终避免在下载/安装R软件包时使用conda。 Instead, CRAN is used. 而是使用CRAN。 It seems something is wrong with the compiled packages in conda. 似乎conda中已编译的软件包有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM