From bfd41f4377c3e69669c43362df32dca744a558d6 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Sat, 11 Feb 2023 21:32:38 -0500 Subject: [PATCH] get it working on M2 Mac In addition, get it working on Podman. Discussion of the Apple silicon M1/M2 arm64 chip: https://github.com/rocker-org/rocker-versioned2/issues/144 --- Dockerfile | 2 +- README.md | 11 +++++++---- code/plot.R | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2078491..4e8f069 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM rocker/tidyverse:3.5.0 +FROM rocker/tidyverse:4.2.2 ADD . / RUN ./run.sh diff --git a/README.md b/README.md index ba8c6cd..f9001dd 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,13 @@ Just a little R project using ggplot2. +Most recently tested using Podman on an M2 Mac. + ``` docker rm extract -docker build -t pdurbin/notice . -docker create --name extract pdurbin/notice -docker cp extract:/results/figure.png /tmp -docker cp extract:/results/figure.svg /tmp +docker build --platform linux/x86_64 -t pdurbin/notice . +docker create --platform linux/x86_64 --name extract pdurbin/notice +mkdir /tmp/out +docker cp extract:/results/figure.png /tmp/out +#docker cp extract:/results/figure.svg /tmp ``` diff --git a/code/plot.R b/code/plot.R index 84ffe81..6edb0ba 100644 --- a/code/plot.R +++ b/code/plot.R @@ -35,4 +35,4 @@ ggplot(renewal, aes(x = Events)) + ) ggsave(path = "results", filename = "figure.png", width = 7, height = 3) -ggsave(path = "results", filename = "figure.svg", width = 7, height = 3) +#ggsave(path = "results", filename = "figure.svg", width = 7, height = 3)