rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

rocker/tidyverse: cannot install magick, ggpubr #162

Closed radiocontrolled closed 4 years ago

radiocontrolled commented 5 years ago

Hello,

I'm trying to install magick and ggpubr after working off a base rocker/tidyverse image, but I run into an error.

What I've tried: playing around with different rocker/tidyverse versions e.g. latest, 3.5.1

My Dockerfile:

FROM rocker/tidyverse:3.5.3
ENV DEBIAN_FRONTEND noninteractive
RUN echo "deb http://ftp.de.debian.org/debian testing main" >> /etc/apt/sources.list
RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local
RUN apt-get update
RUN apt-get -t testing install -y --force-yes python3.6
RUN apt-get -t testing install -y libmagick++-dev
RUN apt-get -t testing install -y python3-pip
RUN apt-get -t testing install -y python-setuptools 

# the following two installs fail -------
RUN install2.r --error \
    magick 

RUN install2.r --error --deps TRUE \
    ggpubr
# end issues -------

RUN mkdir /app

# set the base folder inside the image for Docker to put files in
WORKDIR /app

# copy everything from ellie_twitter_bot to /app
COPY . /app

RUN pip3 install --trusted-host pypi.python.org -r /app/requirements.txt

CMD /app/runner.sh 

Would really appreciate help on how to install these dependencies. Thank you

I get the following error message for magick:

Warning: unable to access index for repository https://mran.microsoft.com/snapshot/2019-04-26/src/contrib:
  internet routines cannot be loaded
Error: package ‘magick’ is not available (for R version 3.5.3)
In addition: Warning message:
package ‘magick’ is not available (for R version 3.5.3)

And the following error message for ggpubr:

Warning: unable to access index for repository https://mran.microsoft.com/snapshot/2019-04-26/src/contrib:
  internet routines cannot be loaded
Error: package ‘ggpubr’ is not available (for R version 3.5.3)
In addition: Warning message:
package ‘ggpubr’ is not available (for R version 3.5.3)
cboettig commented 5 years ago

apologies, looks like you might have been getting timeouts from the MRAN snapshot repo. Just try again now?

Also note that the system libraries are already installed on verse which could save you a step.

magick installed for me just now on rocker/verse:3.5.3 no issues.

radiocontrolled commented 5 years ago

Hey @cboettig thanks for your quick response! @BogdanDogaru worked out that it was also the order of operations in the Dockerfile. Here's an updated image that worked in case this is helpful to anyone:

FROM rocker/verse:3.5.3
ENV DEBIAN_FRONTEND noninteractive

RUN install2.r --error \
    magick 

RUN install2.r --error \
    ggpubr 

RUN install2.r --error \
    extrafont

RUN echo "deb http://ftp.de.debian.org/debian testing main" >> /etc/apt/sources.list
RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local

RUN apt-get update && apt-get -t testing install -y --force-yes python3.6
RUN apt-get update && apt-get -t testing install -y libmagick++-dev python3-pip python-setuptools 

RUN mkdir /app

# set the base folder inside the image for Docker to put files in
WORKDIR /app

# copy everything from ellie_twitter_bot to /app
COPY . /app

RUN pip3 install --trusted-host pypi.python.org -r /app/requirements.txt

CMD /app/runner.sh