TimStats commited on
Commit
539c8b9
·
verified ·
1 Parent(s): c86aa80

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -36
Dockerfile CHANGED
@@ -2,19 +2,54 @@ FROM rocker/r-base:latest
2
 
3
  WORKDIR /code
4
 
5
- # Install system dependencies for all packages including Arrow
6
  RUN apt-get update && apt-get install -y \
7
- libmagick++-dev \
8
- imagemagick \
9
  libcurl4-openssl-dev \
10
  libssl-dev \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  libfontconfig1-dev \
12
  libfreetype6-dev \
13
  libharfbuzz-dev \
14
  libfribidi-dev \
15
- libxml2-dev \
16
- libcairo2-dev \
17
- libxt-dev \
 
 
 
 
 
 
 
18
  cmake \
19
  rapidjson-dev \
20
  libboost-all-dev \
@@ -25,36 +60,7 @@ RUN apt-get update && apt-get install -y \
25
  protobuf-compiler \
26
  && rm -rf /var/lib/apt/lists/*
27
 
28
- # Install R packages excluding arrow
29
- RUN install2.r --error \
30
- remotes \
31
- curl \
32
- httr \
33
- #httpuv \
34
- shiny \
35
- dplyr \
36
- ggplot2 \
37
- readr \
38
- #ggExtra \
39
- patchwork \
40
- gridExtra \
41
- gtable \
42
- bslib \
43
- jsonlite
44
-
45
- # Install magick separately
46
- RUN R -e 'install.packages("magick", repos="https://cloud.r-project.org")'
47
-
48
- # Install showtext
49
- RUN R -e 'install.packages("showtext", repos="https://cloud.r-project.org")'
50
-
51
- # Install arrow with specific environment variables to assist compilation
52
- RUN apt-get update && \
53
- apt-get install -y make &&\
54
- ARROW_R_DEV=true R -e 'Sys.setenv(ARROW_WITH_ZLIB="ON"); Sys.setenv(LIBARROW_MINIMAL="false"); Sys.setenv(ARROW_R_DEV="true"); install.packages("arrow", repos="https://cloud.r-project.org", type="source")'
55
-
56
- # Install fonts
57
- RUN apt-get update && apt-get install -y fonts-roboto
58
 
59
  COPY . .
60
 
 
2
 
3
  WORKDIR /code
4
 
5
+ # Install system dependencies with specific focus on httpuv requirements
6
  RUN apt-get update && apt-get install -y \
 
 
7
  libcurl4-openssl-dev \
8
  libssl-dev \
9
+ libxml2-dev \
10
+ libcairo2-dev \
11
+ libxt-dev \
12
+ make \
13
+ g++ \
14
+ libudunits2-dev \
15
+ zlib1g-dev \
16
+ libbz2-dev \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Install httpuv and its dependencies separately and one at a time
20
+ RUN R -e 'install.packages("later", repos="https://cloud.r-project.org", dependencies=TRUE)'
21
+ RUN R -e 'install.packages("promises", repos="https://cloud.r-project.org", dependencies=TRUE)'
22
+ RUN R -e 'install.packages("httpuv", repos="https://cloud.r-project.org", dependencies=TRUE)'
23
+ RUN R -e 'if(!require("httpuv")) stop("httpuv installation failed")'
24
+
25
+ # Install shiny after httpuv is confirmed working
26
+ RUN R -e 'install.packages("shiny", repos="https://cloud.r-project.org", dependencies=TRUE)'
27
+ RUN R -e 'if(!require("shiny")) stop("shiny installation failed")'
28
+
29
+ # Install basic packages
30
+ RUN R -e 'install.packages(c("remotes", "curl", "httr", "dplyr", "ggplot2", "readr"), repos="https://cloud.r-project.org", dependencies=TRUE)'
31
+
32
+ # Install additional packages
33
+ RUN R -e 'install.packages(c("patchwork", "gridExtra", "gtable", "bslib", "jsonlite"), repos="https://cloud.r-project.org", dependencies=TRUE)'
34
+
35
+ # Install magick and showtext
36
+ RUN apt-get update && apt-get install -y \
37
+ libmagick++-dev \
38
+ imagemagick \
39
  libfontconfig1-dev \
40
  libfreetype6-dev \
41
  libharfbuzz-dev \
42
  libfribidi-dev \
43
+ && rm -rf /var/lib/apt/lists/*
44
+
45
+ RUN R -e 'install.packages("magick", repos="https://cloud.r-project.org", dependencies=TRUE)'
46
+ RUN R -e 'install.packages("showtext", repos="https://cloud.r-project.org", dependencies=TRUE)'
47
+
48
+ # Install fonts
49
+ RUN apt-get update && apt-get install -y fonts-roboto && rm -rf /var/lib/apt/lists/*
50
+
51
+ # Defer arrow installation to the end as it's complex
52
+ RUN apt-get update && apt-get install -y \
53
  cmake \
54
  rapidjson-dev \
55
  libboost-all-dev \
 
60
  protobuf-compiler \
61
  && rm -rf /var/lib/apt/lists/*
62
 
63
+ RUN R -e 'Sys.setenv(ARROW_WITH_ZLIB="ON"); Sys.setenv(LIBARROW_MINIMAL="false"); Sys.setenv(NOT_CRAN="true"); install.packages("arrow", repos="https://cloud.r-project.org", type="source")'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  COPY . .
66