From 9b3c49e0823f55c3b5620b6844bbeb66b62ff0a0 Mon Sep 17 00:00:00 2001 From: Andrew Miller Date: Mon, 10 Jul 2023 10:32:15 -0600 Subject: [PATCH 1/2] fixed apt-get bug working on tidyverse bug --- Dockerfile | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d72d357..837867f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,12 @@ WORKDIR /app COPY www /app/www COPY R /app/R -RUN apt-get update && apt-get install -y xml2 libxml2-dev libssl-dev && apt-get clean +RUN apt-get update --allow-releaseinfo-change && apt-get upgrade -y && apt-get clean +RUN apt-get remove -y binutils && apt-get clean +RUN apt-get install -y xml2 libxml2-dev libssl-dev && apt-get clean RUN apt-get install -y libcurl4-openssl-dev unixodbc-dev && apt-get clean RUN apt-get install -y gfortran -RUN apt-get update && apt-get clean +RUN apt-get update --allow-releaseinfo-change && apt-get clean RUN apt-get install -y libhdf5-dev RUN apt-get -y install libcairo2-dev libxt-dev libfontconfig1-dev RUN apt-get update && apt-get clean @@ -107,6 +109,7 @@ RUN R -e 'library(topGO)' # glmGamPoi RUN R -e 'BiocManager::install("glmGamPoi")' RUN R -e 'library(glmGamPoi)' +RUN R -e 'library(tidyverse)' # Install Docker RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ @@ -133,3 +136,26 @@ RUN chmod a+rwx -R /app # Init image CMD ./init_app.sh +# The error is caused by the fact that the 'tidyverse' package is not installed in the system. You can fix it by modifying the Dockerfile to include the installation of the 'tidyverse' package before calling the 'library' function. Here is an updated version of the Dockerfile: +# +# ``` +# FROM rocker/tidyverse:latest +# +# # install dependencies +# RUN apt-get update && apt-get install -y git-core libssl-dev libcurl4-gnutls-dev +# +# # install packages +# RUN R -e 'install.packages(c("tidyverse", "Seurat"), dependencies = TRUE)' +# +# # set working directory +# WORKDIR /app +# +# # copy files +# COPY . /app +# +# # run analysis +# CMD ["Rscript", "analysis.R"] +# ``` +# +# Note that we have added the installation of the 'tidyverse' package, along with the 'Seurat' package, using the same R command. This should fix the issue and allow you to run the Docker container without errors. +# From 24d8f991fe978e2873ca8830425879f89e6042f8 Mon Sep 17 00:00:00 2001 From: Stephen Combs Date: Tue, 11 Jul 2023 10:03:13 -0400 Subject: [PATCH 2/2] recommended Docker file update - tested on mac build --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 837867f..2e0cd16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,10 +14,13 @@ RUN apt-get update --allow-releaseinfo-change && apt-get upgrade -y && apt-get c RUN apt-get remove -y binutils && apt-get clean RUN apt-get install -y xml2 libxml2-dev libssl-dev && apt-get clean RUN apt-get install -y libcurl4-openssl-dev unixodbc-dev && apt-get clean -RUN apt-get install -y gfortran RUN apt-get update --allow-releaseinfo-change && apt-get clean RUN apt-get install -y libhdf5-dev RUN apt-get -y install libcairo2-dev libxt-dev libfontconfig1-dev +# support libraries added tested with buld on mac, addresses tidyverse build issue, fftw3 added for "metap" +RUN apt-get install -y build-essential +RUN apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev +RUN apt-get install -y libgsl-dev RUN apt-get update && apt-get clean @@ -29,6 +32,8 @@ RUN R -e 'library(BiocManager)' RUN R -e 'install.packages("tidyverse", dep = T)' RUN R -e 'library(tidyverse)' # seurat +# * added gfortran overide to build-essential for newer package - tidyverse uses the older version +RUN apt-get install -y gfortran RUN R -e 'install.packages("Seurat", dep = T)' RUN R -e 'library(Seurat)' RUN R -e 'install.packages("SeuratObject", dep = T)' @@ -109,7 +114,6 @@ RUN R -e 'library(topGO)' # glmGamPoi RUN R -e 'BiocManager::install("glmGamPoi")' RUN R -e 'library(glmGamPoi)' -RUN R -e 'library(tidyverse)' # Install Docker RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \