Skip to content

Commit

Permalink
Update README to reflect #17 and #14 [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Feb 7, 2023
1 parent 795d9aa commit e42d629
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
19 changes: 18 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,15 @@ loaded via a namespace (and not attached):
[37] crayon_1.3.4
```

## Using alternative Rocker images
### Caching R packages

One can also cache (or archive) the R packages from CRAN at the time `dockerize` is executed. The cached R packages will then transfer to the container. Please note that system requirements (i.e. `deb` packages) are not cached.

```r
dockerize(graph, "~/rocker_test", cache = TRUE)
```

### Using alternative Rocker images

One can also select other Rocker versioned images: `rstudio`, `tidyverse`, `verse`, `geospatial`.

Expand All @@ -142,6 +150,15 @@ sudo docker run -p 8787:8787 -e PASSWORD=abc123 --rm --name "grantest" -ti gran

With any browser, go to: `local:8787`. The default username is `rstudio`, password is as specified.

## Recreate the computational environment for R < 3.1.0

`gran` can still be used to recreate computational environments for R < 3.1.0. The Dockerfile generated is based on Debian Woody (3.0) and the requested version of R is compiled from source. As of writing, this method works for R < 3.1.0 but not R < 2.1.0. The `image` parameter is ignored in this case.

```r
gran_rio <- resolve("rio", snapshot_date = "2013-08-28") ## R 3.0.1
dockerize(gran_rio, output_dir = "~/old_renviron")
```

## Acknowledgment

The logo of gran is a remix of [this](https://commons.wikimedia.org/wiki/File:Flag_of_the_Canary_Islands.svg) public domain image. The two dogs should be *Presa Canario*, the native dog breed on the islands of Gran Canaria and Tenerife.
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,18 @@ loaded via a namespace (and not attached):
[37] crayon_1.3.4
```

## Using alternative Rocker images
### Caching R packages

One can also cache (or archive) the R packages from CRAN at the time
`dockerize` is executed. The cached R packages will then transfer to the
container. Please note that system requirements (i.e. `deb` packages)
are not cached.

``` r
dockerize(graph, "~/rocker_test", cache = TRUE)
```

### Using alternative Rocker images

One can also select other Rocker versioned images: `rstudio`,
`tidyverse`, `verse`, `geospatial`.
Expand All @@ -165,6 +176,19 @@ sudo docker run -p 8787:8787 -e PASSWORD=abc123 --rm --name "grantest" -ti gran
With any browser, go to: `local:8787`. The default username is
`rstudio`, password is as specified.

## Recreate the computational environment for R \< 3.1.0

`gran` can still be used to recreate computational environments for R \<
3.1.0. The Dockerfile generated is based on Debian Woody (3.0) and the
requested version of R is compiled from source. As of writing, this
method works for R \< 3.1.0 but not R \< 2.1.0. The `image` parameter is
ignored in this case.

``` r
gran_rio <- resolve("rio", snapshot_date = "2013-08-28") ## R 3.0.1
dockerize(gran_rio, output_dir = "~/old_renviron")
```

## Acknowledgment

The logo of gran is a remix of
Expand Down

0 comments on commit e42d629

Please # to comment.