Dirk Eddelbuettel
2024-Jul-10 16:09 UTC
[R-sig-Debian] Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Lauren, I am now back home where looking into these things is a little easier. From your first email to me, I started off with the selenium container you mentioned as your starting point. And that basically is your issue. It is a 'high-level' container, and it sets a user. (Essentially) all other Dockerfiles you have seen and been pointed at are 'lower-level' and operate as root -- so you need to inject 'sudo' calls. Otherwise it really is 'just' getting one key and adding one repo, but it helps to have had the same user <-> root issues before ... So below is a working 'minimal' Dockerfile that gets me R 4.4.1 (validated via 'docker exec -ti container_id_here bash' once built). Hope it helps. Best, Dirk FROM selenium/standalone-firefox:latest ## Following the standard rocker/r2u:jammy Dockerfile, and adapted slightly RUN sudo apt update \ ## ## We would normally do ## apt install --yes --no-install-recommends ca-certificates locales wget ## but these are already installed ## ## So we skip to the next step of adding the key and repo && wget -q -O - https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \ | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \ && echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/cran_ubuntu_key.asc] https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" \ | sudo tee -a /etc/apt/sources.list.d/cran.list \ ## ## Update again and install R && sudo apt update -qqq \ && sudo apt install --yes --no-install-recommends r-base-core -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Gerber, Lauren J
2024-Jul-10 16:43 UTC
[R-sig-Debian] Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Hi Dirk, Thank you so much for looking into this when you got home. I greatly appreciate it. I was actually in the midst of writing to everyone the following message: ?. ?. ?. Hi All, I have some good news. ? My docker image is now up-to-date with R version 4.4.1. I first had to clear a bunch of unused data using docker system prune ?force. Apparently, it cleared over 32.53 gigs of data, and seemed to have been interfering with some of the package installations trying to take place. Next, I tried using part of Marco?s dockerfile and it helped solve the issue: RUN apt-get update \ && apt install -y \ software-properties-common \ dirmngr \ gnupg2 \ wget \ build-essential \ libcurl4-openssl-dev \ libxml2-dev \ libasound2 \ python3 \ python3-pip \ python3.10-venv \ git-all \ lsb-release \ libxml-twig-perl \ libc6-dev \ && wget -q -O - https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \ | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \ && add-apt-repository -y "ppa:marutter/rrutter4.0" RUN apt-get update -y \ && apt-get install -y r-base\ && apt-get clean \ && apt-get purge \ && rm -rf /var/lib/apt/lists/* /tmp/* Then I ran my Docker image in interactive mode to check it and it worked ?: /# apt-cache policy r-base-core r-base-core: Installed: 4.4.1-1.2204.0 Candidate: 4.4.1-1.2204.0 Version table: *** 4.4.1-1.2204.0 100 100 /var/lib/dpkg/status This is great. Thank you all so much. Br, Lauren -- Lauren J. Gerber Bioinformatician Precision Systems Medicine (Kallioniemi) Research Group iCAN ? Digital Precision Cancer Medicine Flagship Institute for Molecular Medicine Finland (FIMM) Nordic EMBL Partnership for Molecular Medicine Biomedicum Helsinki 2U, D301a1 P.O. Box 20 (Tukholmankatu 8) FI-00014 University of Helsinki, Finland lauren.gerber at helsinki.fi From: Dirk Eddelbuettel <edd at debian.org> Date: Wednesday, 10. July 2024 at 19.09 To: Gerber, Lauren J <lauren.gerber at helsinki.fi> Cc: Dirk Eddelbuettel <edd at debian.org>, marcoblanchette at icloud.com <marcoblanchette at icloud.com>, r-sig-debian at r-project.org <r-sig-debian at r-project.org> Subject: Re: [R-sig-Debian] Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image Lauren, I am now back home where looking into these things is a little easier. From your first email to me, I started off with the selenium container you mentioned as your starting point. And that basically is your issue. It is a 'high-level' container, and it sets a user. (Essentially) all other Dockerfiles you have seen and been pointed at are 'lower-level' and operate as root -- so you need to inject 'sudo' calls. Otherwise it really is 'just' getting one key and adding one repo, but it helps to have had the same user <-> root issues before ... So below is a working 'minimal' Dockerfile that gets me R 4.4.1 (validated via 'docker exec -ti container_id_here bash' once built). Hope it helps. Best, Dirk FROM selenium/standalone-firefox:latest ## Following the standard rocker/r2u:jammy Dockerfile, and adapted slightly RUN sudo apt update \ ## ## We would normally do ## apt install --yes --no-install-recommends ca-certificates locales wget ## but these are already installed ## ## So we skip to the next step of adding the key and repo && wget -q -O - https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \ | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \ && echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/cran_ubuntu_key.asc] https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" \ | sudo tee -a /etc/apt/sources.list.d/cran.list \ ## ## Update again and install R && sudo apt update -qqq \ && sudo apt install --yes --no-install-recommends r-base-core -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org [[alternative HTML version deleted]]
Apparently Analagous Threads
- Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
- Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
- Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
- Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
- Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image