mybinder Cookbook
2020-02-24
- 使用 RMarkdown 的
child
参数,进行文档拼接。 - 这样拼接以后的笔记方便复习。
- 相关问题提交到 Issue
以项目 tutoring2
和 nCov2019_analysis
为例。
http://beta.mybinder.org/v2/gh/JiaxiangBU/tutoring2/master?urlpath=rstudio
1 查找不到 DESCRIPTION
打开 mybind.org 报错。
Step 7/7 : RUN wget https://github.com/JiaxiangBU/tutoring/raw/master/DESCRIPTION && R -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2019-07-05/')); devtools::install_deps()"
---> Running in ca46e7c23c5b
--2020-02-23 17:42:34-- https://github.com/JiaxiangBU/tutoring/raw/master/DESCRIPTION
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-02-23 17:42:34 ERROR 404: Not Found.
Removing intermediate container ca46e7c23c5b
The command '/bin/sh -c wget https://github.com/JiaxiangBU/tutoring/raw/master/DESCRIPTION && R -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2019-07-05/')); devtools::install_deps()"' returned a non-zero code: 8
打开文件Dockerfile
## ../tutoring2/.binder/Dockerfile
FROM rocker/binder:3.6.0
LABEL maintainer='Jiaxiang Li'
USER root
COPY . ${HOME}
RUN chown -R ${NB_USER} ${HOME}
USER ${NB_USER}
RUN wget https://github.com/JiaxiangBU/tutoring2/raw/master/DESCRIPTION && R -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2019-07-05/')); devtools::install_deps()"
保证RUN wget https://github.com/JiaxiangBU/tutoring2/raw/master/DESCRIPTION
路径准确。
2 holepunch
参考 https://karthik.github.io/holepunch/articles/getting_started.html