saigegit / SAIGE

Development for SAIGE and SAIGE-GENE(+)
GNU General Public License v3.0
64 stars 27 forks source link

Container releases #149

Open mvforster opened 3 weeks ago

mvforster commented 3 weeks ago

Dear SAIGE team, Many thanks for this tool. I can see that the most up-to-date releases for SAIGE are available via Docker Hub, however, the base image that you use is Ubuntu 20.04 which contains many security vulnerabilities that are hard/impossible to plug.

Would it be possible to update the base image that you use for the container on Docker Hub to 24.04? I would be more than happy to build the container from first principles but it is unclear if the tags on in this GitHub repo match those from Docker Hub.

For reference I have been able to build a container based on the latest commit to this repository with the following Dockerfile:

FROM ubuntu:24.04 AS builder

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND="noninteractive"

RUN apt update && \
    apt upgrade -y && \
    apt install -y \
        build-essential \
        cmake \
        git \
        libopenblas-dev \
        python3-pip \
        r-cran-devtools && \
    apt clean && \
    rm -rf /var/lib/apt/lists/*

RUN pip3 install --break-system-packages --upgrade cget setuptools

RUN git clone https://github.com/saigegit/SAIGE.git

WORKDIR /app
RUN mv /SAIGE/* /app

RUN  Rscript extdata/install_packages.R

ENV OMP_NUM_THREADS=1

RUN R CMD INSTALL .

RUN  mv extdata/step1_fitNULLGLMM.R extdata/step2_SPAtests.R extdata/step3_LDmat.R extdata/createSparseGRM.R /usr/local/bin/

RUN chmod a+x /usr/local/bin/*

RUN createSparseGRM.R  --help
RUN step1_fitNULLGLMM.R --help
RUN step2_SPAtests.R --help
RUN step3_LDmat.R --help

FROM ubuntu:24.04 AS saige

RUN apt update && \
    apt upgrade -y && \
    apt install -y \
        r-base \
        libtbb-dev \
        libtbb-doc \
        libtbbbind-2-5 \
        libtbbmalloc2

WORKDIR /app

RUN R -e 'install.packages("Rcpp", repos="http://cloud.r-project.org", dependencies = TRUE)'

COPY --from=builder /usr/local/lib/R/site-library/ /usr/local/lib/R/site-library/
COPY --from=builder /usr/lib/R/site-library /usr/lib/R/site-library
COPY --from=builder /usr/lib/R/library /usr/lib/R/library

COPY --from=builder /usr/local/bin/*.R /usr/local/bin/

RUN apt-get update && \
    apt-get install -y time && \
    apt-get upgrade -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

I would appreciate being able to use the latest version of SAIGE within a secure image.

Kind regards,

Matthieu