diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..4337ae9 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,31 @@ +# .github/workflows/docker-build.yml +name: Build & Push Docker image + +on: + push: + branches: + - main + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 1. Check out your fork (and Dockerfile) + - uses: actions/checkout@v3 + + # 2. Log in to Docker Hub + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # 3. Build & push your image + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: Dockerfile + push: true + tags: oaziz05/bpp-arpip:latest diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..f7c767d --- /dev/null +++ b/dockerfile @@ -0,0 +1,101 @@ +FROM ubuntu:22.04 + +ENV PATH=/DASM-arpip/.local/bin:$PATH \ + LD_LIBRARY_PATH=/DASM-arpip/.local/lib:$LD_LIBRARY_PATH + +# install basics +RUN apt-get update \ + && apt-get install -y \ + g++ \ + git \ + wget \ + make \ + libssl-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + + +WORKDIR /DASM-arpip + +# build & install CMake locally +RUN wget https://cmake.org/files/v3.16/cmake-3.16.3.tar.gz \ + && tar zxvf cmake-3.16.3.tar.gz \ + && cd cmake-3.16.3 \ + && ./bootstrap --prefix=/DASM-arpip/.local \ + && make -j"$(nproc)" && make install \ + && cd .. \ + && rm -rf cmake-3.16.3 cmake-3.16.3.tar.gz + + + # bpp-core +RUN git clone https://github.com/BioPP/bpp-core \ +&& cd bpp-core \ +&& git checkout tags/v2.4.1 -b v241 \ +\ +# patch GlobalGraph.cpp: add and qualify numeric_limits +&& sed -i '1i#include ' src/Bpp/Graph/GlobalGraph.cpp \ +&& sed -i 's/numeric_limits