Last active
March 24, 2020 02:31
-
-
Save informationsea/5c5ae2ec9c0e3d540ffd7a0a3470ca44 to your computer and use it in GitHub Desktop.
Build TileDBVCF for Cent OS 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 AS download-cmake | |
RUN mkdir -p /download | |
WORKDIR /download | |
RUN curl -OL https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0.tar.gz | |
RUN tar xzf cmake-3.17.0.tar.gz | |
FROM centos:7 AS build-cmake | |
RUN yum update -y | |
RUN yum install -y gcc gcc-c++ make zlib-devel curl-devel openssl-devel libarchive-devel ncurses-devel readline-devel | |
COPY --from=download-cmake /download/cmake-3.17.0 /src/cmake-3.17.0 | |
WORKDIR /src/cmake-3.17.0 | |
RUN ./configure --prefix=/opt/cmake && make -j4 | |
RUN make install | |
FROM centos:7 AS download-gcc | |
RUN mkdir -p /download | |
WORKDIR /download | |
RUN curl -OL http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-9.3.0/gcc-9.3.0.tar.xz | |
RUN tar xJf gcc-9.3.0.tar.xz | |
FROM centos:7 AS build-gcc | |
RUN yum update -y | |
RUN yum install -y gcc gcc-c++ make zlib-devel libmpc-devel libmpfr-devel libgmp-devel | |
COPY --from=download-gcc /download/gcc-9.3.0 /src/gcc | |
RUN mkdir -p /build/gcc | |
WORKDIR /build/gcc | |
RUN /src/gcc/configure --prefix=/opt/gcc-9.3.0 --enable-languages=c,c++,fortran,lto --disable-multilib | |
RUN make -j4 | |
RUN make install | |
FROM centos:7 AS download-tiledb | |
RUN mkdir -p /download | |
WORKDIR /download | |
RUN yum install -y git | |
RUN git clone https://github.com/TileDB-Inc/TileDB-VCF.git | |
WORKDIR /download/TileDB-VCF | |
RUN git checkout 0.3.1 | |
FROM centos:7 AS build-tildedb | |
RUN yum install -y gcc gcc-c++ make zlib-devel automake autoconf libtool xz-devel bzip2-devel git openssl-devel libcurl-devel tbb-devel chrpath | |
COPY --from=build-cmake /opt/cmake /opt/cmake | |
COPY --from=build-gcc /opt/gcc-9.3.0 /opt/gcc-9.3.0 | |
ENV PATH /opt/cmake/bin:/opt/gcc-9.3.0/bin:$PATH | |
ENV CC /opt/gcc-9.3.0/bin/gcc | |
ENV CXX /opt/gcc-9.3.0/bin/g++ | |
WORKDIR /build | |
COPY --from=download-tiledb /download/TileDB-VCF /build/TileDB-VCF | |
WORKDIR /build/TileDB-VCF/libtiledbvcf/build | |
RUN cmake .. && make -j4 | |
RUN make install-libtiledbvcf | |
RUN cp -P /opt/gcc-9.3.0/lib64/libgcc* /opt/gcc-9.3.0/lib64/libstdc++* /build/TileDB-VCF/dist/lib/ | |
RUN chrpath -r '$ORIGIN/../lib' /build/TileDB-VCF/dist/bin/tiledbvcf | |
WORKDIR /build/TileDB-VCF/dist/ | |
RUN tar czf /tiledbvcf.tar.gz . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment