Skip to content

Commit

Permalink
Merge pull request #20 from lnnrtwttkhn/osip
Browse files Browse the repository at this point in the history
Merge update for OSIP talk
  • Loading branch information
lnnrtwttkhn authored Jan 20, 2023
2 parents e0ed9a1 + ea869bf commit 019605e
Show file tree
Hide file tree
Showing 13 changed files with 3,010 additions and 102 deletions.
9 changes: 8 additions & 1 deletion .Rprofile
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
source("renv/activate.R")
# if the current directory is called "/home" and the parent directory contains
# a file called ".dockerenv", we know we are in a docker container
# in this case DO NOT activate renv
if ( here::here() == "/home" && file.exists(here::here("../.dockerenv")) == TRUE ) {
} else {
# source("renv/activate.R")
}

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: lennartwittkuhn/talk-rdm
image: lennartwittkuhn/talk-rdm:amd64
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ libs
*.html
input
public
*.pdf
*.pdf
.Rhistory
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM r-base:4.0.3
FROM r-base:4.2.2

RUN apt-get update

Expand All @@ -7,7 +7,7 @@ RUN echo 'options(Ncpus=4, repos=structure(c(CRAN="https://cloud.r-project.org")
RUN echo 'installOrQuit <- function(p) {tryCatch(install.packages(p), warning=function(e){q(status=1)})}' >> ~/.Rprofile

# external dependencies
RUN apt-get install -y pandoc pandoc-citeproc && apt-get clean
RUN apt-get install -y pandoc && apt-get clean

# prefer binary R packages, if they are available
RUN apt-get update && apt-get install -y \
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ talk-rdm.html: talk-rdm.Rmd

public/index.html: index.Rmd talk-rdm.Rmd archive
Rscript -e "rmarkdown::render('index.Rmd', output_dir = 'public', output_file = 'index.html')"


.PHONY: local
local: talk-rdm.Rmd
Rscript -e "xaringan::inf_mr('talk-rdm.Rmd')"

.PHONY: docker-build
docker-build:
docker build --platform linux/amd64 -t lennartwittkuhn/talk-rdm:amd64 .

.PHONY: docker-push
docker-push:
docker push lennartwittkuhn/talk-rdm:amd64

.PHONY: docker-pull
docker-pull:
docker image pull lennartwittkuhn/talk-rdm:amd64
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Slides are available at: https://lennartwittkuhn.com/talk-rdm/

| When | What | Host |
|---|---|---|
| 18<sup>th</sup> of January 2023 | [Open Science Initiative at the Department of Psychology (OSIP)](https://tu-dresden.de/mn/psychologie/die-fakultaet/open-science#) at [TU Dresden](https://tu-dresden.de/) |
| 13<sup>th</sup> of September 2022 | [5<sup>th</sup> RDM-Workshop 2022 on Research Data Management in the Max Planck Society](https://rdm.mpdl.mpg.de/mpdl-services/workshops/5-fdm-workshop-2022/) | [Max Planck Digital Library (MPDL)](https://www.mpdl.mpg.de/en/) |
| 20<sup>th</sup> of October 2021 | LNDG Lab meeting | [Lifespan Neural Dynamics Group (LNDG)](https://www.mpib-berlin.mpg.de/research/research-centers/lip/projects/lndg) at the [Max Planck Institute for Human Development](https://www.mpib-berlin.mpg.de/en) |
| 18<sup>th</sup> of October 2021 | ["Open Science Ambassadors Day 2021"](https://osambassadors.mpdl.mpg.de/) | [Max Planck PhDnet](https://www.phdnet.mpg.de/home) and the [Max Planck Digital Library](https://www.mpdl.mpg.de/en/) |
Expand All @@ -33,20 +34,40 @@ Note, that this does not render the RMarkdown in the Docker container but your l

After updating the [Dockerfile](Dockerfile), I use the following command to push the newest image to [dockerhub](https://hub.docker.com/r/lennartwittkuhn/talk-rdm):

### Login

```bash
docker login
```

### Build

```bash
docker build --platform linux/amd64 -t lennartwittkuhn/talk-rdm:amd64 .
```

### Push

```bash
docker push lennartwittkuhn/talk-rdm:amd64
```

### Pull

```bash
docker build -t lennartwittkuhn/talk-rdm:latest .
docker image pull lennartwittkuhn/talk-rdm:amd64
```

### Run

```bash
docker push lennartwittkuhn/talk-rdm:latest
docker run --rm --platform linux/amd64 -v $PWD:/home lennartwittkuhn/talk-rdm:amd64 /bin/sh -c "cd /home; make all"
```

### Run interactively

```bash
docker run --rm -v $PWD:/home lennartwittkuhn/talk-rdm /bin/sh -c "cd /home; make all"
docker run -it --rm --platform linux/amd64 -v $PWD:/home lennartwittkuhn/talk-rdm:amd64 /bin/sh
```

## Make PDF
Expand Down
2 changes: 1 addition & 1 deletion archive/20211018-osambassadors/talk-rdm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ knitr::include_graphics("https://the-turing-way.netlify.app/_images/reproducible
# Challenges: Many stages in the research cycle

```{r, echo=FALSE, fig.align="center", out.width="58%", fig.retina=1, fig.cap='<a href="https://zenodo.org/record/4906004" target="_blank"><sup>by Scriberia for The Turing Way community (CC-BY 4.0)</sup></a>'}
knitr::include_graphics("https://the-turing-way.netlify.app/_images/research-cycle.jpg")
knitr::include_graphics("https://keeper.mpdl.mpg.de/f/3a1863ac2c2e40809c5f/?dl=1")
```

---
Expand Down
2 changes: 1 addition & 1 deletion archive/20211020-lndg/talk-rdm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ knitr::include_graphics("https://the-turing-way.netlify.app/_images/reproducible
# Challenges: Many stages in the research cycle

```{r, echo=FALSE, fig.align="center", out.width="58%", fig.retina=1, fig.cap='<a href="https://zenodo.org/record/4906004" target="_blank"><sup>by Scriberia for The Turing Way community (CC-BY 4.0)</sup></a>'}
knitr::include_graphics("https://the-turing-way.netlify.app/_images/research-cycle.jpg")
knitr::include_graphics("https://keeper.mpdl.mpg.de/f/3a1863ac2c2e40809c5f/?dl=1")
```

---
Expand Down
4 changes: 2 additions & 2 deletions archive/20220913-mpg-fdm-workshop/talk-rdm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ knitr::include_graphics("https://the-turing-way.netlify.app/_images/reproducible
# Challenge: Many stages in the research cycle

```{r, echo=FALSE, fig.align="center", out.width="58%", fig.retina=1, fig.cap='<a href="https://zenodo.org/record/4906004" target="_blank"><sup>by Scriberia for The Turing Way community (CC-BY 4.0)</sup></a>'}
knitr::include_graphics("https://the-turing-way.netlify.app/_images/research-cycle.jpg")
knitr::include_graphics("https://keeper.mpdl.mpg.de/f/3a1863ac2c2e40809c5f/?dl=1")
```

???
Expand Down Expand Up @@ -1662,7 +1662,7 @@ knitr::include_graphics("https://the-turing-way.netlify.app/_images/reproducible
# Challenges: Many stages in the research cycle

```{r, echo=FALSE, fig.align="center", out.width="58%", fig.retina=1, fig.cap='<a href="https://zenodo.org/record/4906004" target="_blank"><sup>by Scriberia for The Turing Way community (CC-BY 4.0)</sup></a>'}
knitr::include_graphics("https://the-turing-way.netlify.app/_images/research-cycle.jpg")
knitr::include_graphics("https://keeper.mpdl.mpg.de/f/3a1863ac2c2e40809c5f/?dl=1")
```

---
Expand Down
Loading

0 comments on commit 019605e

Please sign in to comment.