International Rice Research Institute commited on
Commit
3c8c922
·
verified ·
1 Parent(s): 921159a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -3
Dockerfile CHANGED
@@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y \
20
  libgmp-dev \
21
  zlib1g-dev \
22
  libbz2-dev \
 
23
  && apt-get clean \
24
  && rm -rf /var/lib/apt/lists/*
25
 
@@ -79,9 +80,43 @@ RUN install2.r --error --repo https://cloud.r-project.org \
79
  qtl \
80
  > install_qtl.log 2>&1 || cat install_qtl.log
81
 
82
- # Install packages from GitHub
83
- RUN R -e "remotes::install_github('jtlovell/qtlTools', ref='main')" > install_qtlTools.log 2>&1 && cat install_qtlTools.log
84
- RUN R -e "remotes::install_github('bmansfeld/QTLseqr', ref='main')" > install_QTLseqr.log 2>&1 && cat install_QTLseqr.log
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  # Create www directory and health file
87
  RUN mkdir -p /code/www && echo "OK" > /code/www/health
 
20
  libgmp-dev \
21
  zlib1g-dev \
22
  libbz2-dev \
23
+ libgit2-dev \
24
  && apt-get clean \
25
  && rm -rf /var/lib/apt/lists/*
26
 
 
80
  qtl \
81
  > install_qtl.log 2>&1 || cat install_qtl.log
82
 
83
+ # Install system dependencies for qtlTools
84
+ RUN apt-get update && apt-get install -y \
85
+ libudunits2-dev \
86
+ libgsl-dev \
87
+ && apt-get clean \
88
+ && rm -rf /var/lib/apt/lists/*
89
+
90
+ # Try alternative installation methods for problematic packages
91
+ # First attempt: Install qtlTools with specific version and skip dependencies if needed
92
+ RUN R -e "options(timeout = 600); \
93
+ tryCatch({ \
94
+ remotes::install_github('jtlovell/qtlTools', ref='main', dependencies=TRUE, upgrade='always') \
95
+ }, error = function(e) { \
96
+ message('First attempt failed: ', e$message); \
97
+ tryCatch({ \
98
+ remotes::install_github('jtlovell/qtlTools', ref='main', dependencies=FALSE, upgrade='never') \
99
+ }, error = function(e) { \
100
+ message('Second attempt failed: ', e$message); \
101
+ # Install from CRAN if available or skip if not critical \
102
+ install.packages('qtlTools', repos='https://cloud.r-project.org') \
103
+ }) \
104
+ })" > install_qtlTools.log 2>&1 && cat install_qtlTools.log
105
+
106
+ # Install QTLseqr with similar error handling
107
+ RUN R -e "options(timeout = 600); \
108
+ tryCatch({ \
109
+ remotes::install_github('bmansfeld/QTLseqr', ref='main', dependencies=TRUE, upgrade='always') \
110
+ }, error = function(e) { \
111
+ message('First attempt failed: ', e$message); \
112
+ tryCatch({ \
113
+ remotes::install_github('bmansfeld/QTLseqr', ref='main', dependencies=FALSE, upgrade='never') \
114
+ }, error = function(e) { \
115
+ message('Second attempt failed: ', e$message); \
116
+ # Install from CRAN if available \
117
+ install.packages('QTLseqr', repos='https://cloud.r-project.org') \
118
+ }) \
119
+ })" > install_QTLseqr.log 2>&1 && cat install_QTLseqr.log
120
 
121
  # Create www directory and health file
122
  RUN mkdir -p /code/www && echo "OK" > /code/www/health