1- FROM ubuntu:22.04
1+ # Use Ubuntu 24.04 as the base image
2+ FROM ubuntu:24.04
23
34LABEL org.label-schema.vendor="OpenCB" \
45 org.label-schema.name="opencga-ext-tools" \
@@ -7,16 +8,23 @@ LABEL org.label-schema.vendor="OpenCB" \
78 maintainer="Joaquin Tarraga <joaquintarraga@gmail.com>" \
89 org.label-schema.schema-version="1.0"
910
10- # # Run update and install necessary packages
11- RUN apt-get update -y && \
12- # # 1. Install system dependencies
13- DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" apt-get install -y libcurl4 git libgmp-dev libcurl4-openssl-dev libgit2-dev build-essential \
11+ # Prevent interactive prompts during package installation
12+ ARG DEBIAN_FRONTEND=noninteractive
13+
14+ # Install Python 3, pip, and other dependencies in a single RUN command
15+ RUN apt-get update && \
16+ # ## 1. Install system dependencies
17+ apt-get install -y \
18+ libcurl4 git libgmp-dev libcurl4-openssl-dev libgit2-dev build-essential \
1419 libssl-dev libssh-dev libxml2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev \
15- gnuplot pandoc samtools bcftools tabix fastqc plink1.9 bwa r-base wget libopenblas0-openmp libcholmod3 libsuitesparse-dev python3 python3-pip && \
20+ gnuplot pandoc samtools bcftools tabix fastqc plink1.9 bwa r-base wget libopenblas0-openmp libcholmod5 libsuitesparse-dev libsuitesparseconfig7 \
21+ python3 python3-pip && \
1622 apt-get remove libopenblas0-pthread && \
17- pip3 install pydantic && \
1823
19- # # 2. Install samtools and bcftools 1.21 and plugins
24+ # 2. Install Python packages
25+ pip3 install --break-system-packages pydantic && \
26+
27+ # # 3. Install samtools and bcftools 1.21 and plugins
2028 wget https://github.com/samtools/samtools/releases/download/1.21/samtools-1.21.tar.bz2 && \
2129 tar xjvf samtools-1.21.tar.bz2 && \
2230 cd samtools-1.21 && \
@@ -36,12 +44,16 @@ RUN apt-get update -y && \
3644 chmod a+x /usr/local/bin/assoc_plot.R && \
3745 cd .. && \
3846
39- # # 3. Installation dependencies using R install.packages() is slower than apt-get but final size is 400MB smaller.
47+ # # 4. Install regenie
48+ wget -qO- https://github.com/rgcgithub/regenie/releases/download/v4.0/regenie_v4.0.gz_x86_64_Linux.zip | gunzip > /usr/local/bin/regenie && \
49+ chmod +x /usr/local/bin/regenie && \
50+
51+ # # 5. Installation dependencies using R install.packages() is slower than apt-get but final size is 400MB smaller.
4052 R -e "install.packages(c('BiocManager', 'RCircos', 'nnls', 'ggplot2', 'jsonlite', 'optparse', 'knitr', 'configr', 'dplyr', 'rmarkdown', 'tidyr', 'httr', 'kinship2', 'limSolve'))" && \
4153 R -e "BiocManager::install('BiocStyle')" && \
4254 R -e "BiocManager::install('BSgenome.Hsapiens.UCSC.hg38')" && \
4355
44- # # 4 . Install signature.tools.lib installation \
56+ # # 6 . Install signature.tools.lib installation \
4557 R -e "install.packages(c('devtools', 'getopt'), repos=c('http://cran.rstudio.com/', 'https://www.stats.bris.ac.uk/R/'))" && \
4658 git clone https://github.com/Nik-Zainal-Group/signature.tools.lib.git /opt/opencga/signature.tools.lib && \
4759 cd /opt/opencga/signature.tools.lib && \
@@ -53,10 +65,13 @@ RUN apt-get update -y && \
5365 R -e "options(timeout = 3600);devtools::install(repos='https://www.stats.bris.ac.uk/R/')" && \
5466 cd .. && \
5567
56- # # 5. Clean up
68+ # # 7. Clean up
69+ apt-get clean && \
5770 rm -rf samtools-1.21 bcftools-1.21 /var/lib/apt/lists/* /tmp/* /opt/opencga/signature.tools.lib/.git && \
5871 strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
5972
73+ # Set the working directory
74+ WORKDIR /opt/opencga
75+
6076ENV BCFTOOLS_PLUGINS="/usr/local/bin"
6177
62- WORKDIR /opt/opencga
0 commit comments