-
-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57e06af
commit 13b9717
Showing
9 changed files
with
97 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM rocker/binder:4.1.2 | ||
|
||
## Declares build arguments | ||
ARG NB_USER | ||
ARG NB_UID | ||
|
||
COPY --chown=${NB_USER} . ${HOME} | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
USER root | ||
RUN echo "Checking for 'apt.txt'..." \ | ||
; if test -f "apt.txt" ; then \ | ||
apt-get update --fix-missing > /dev/null\ | ||
&& xargs -a apt.txt apt-get install --yes \ | ||
&& apt-get clean > /dev/null \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
; fi | ||
USER ${NB_USER} | ||
|
||
## Run an install.R script, if it exists. | ||
RUN if [ -f install.R ]; then R --quiet -f install.R; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2021, Yuvi Panda | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Template for RStudio on Binder / JupyterHub | ||
|
||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/yuvipanda/rstudio-binder-template/HEAD?urlpath=rstudio) | ||
|
||
Generate a Git repository that can run R code with RStudio on | ||
the browser via [mybinder.org](https://mybinder.org) or any JupyterHub | ||
from this template repository! | ||
|
||
Based on the excellent [rocker/binder](https://hub.docker.com/r/rocker/binder) | ||
image maintained by the [Rocker project](https://www.rocker-project.org/) | ||
|
||
## How to use this reop | ||
|
||
### 1. Create a new repo using this as a template | ||
|
||
Use the [Use this template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) | ||
button on GitHub. Use a descriptive name representing the | ||
GUI app you are running / demoing. You can then follow the rest of | ||
the instructions in this README from your newly created repository. | ||
|
||
### 2. Install any packages you want | ||
|
||
You can create an `install.R` file that will be executed on build. | ||
Use `install.packages` or `devtools::install_version`. | ||
|
||
```R | ||
install.packages("ggplot2") | ||
``` | ||
|
||
Packages are installed from [packagemanager.rstudio.com](https://packagemanager.rstudio.com/client/#/), | ||
and binary packages are preferred wherever possible. For some R packages, | ||
you might need to install system packages via apt - you can do so by writing | ||
out a list of apt package names in `apt.txt`. | ||
|
||
### 3. Modify the Binder Badge in the README.md | ||
|
||
The 'Launch on Binder' badge in this README points to the template repository. | ||
You should modify it to point to your own repository. Keep the `urlpath=rstudio` | ||
parameter intact - that is what makes sure your repo will launch directly into | ||
RStudio | ||
|
||
### 4. Add your R code and update README | ||
|
||
Finally, add the R code you want to demo to the repository! Cleanup the README | ||
too so it talks about your code, not these instructions on setting up this repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
libprotobuf-dev | ||
vim |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install.packages("ggplot2") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.