From 5fd8871f6c7b16e68e03bc5c39f4150b12c8b32c Mon Sep 17 00:00:00 2001 From: Harsha Vardhan Simhadri Date: Wed, 5 Apr 2023 14:12:05 -0700 Subject: [PATCH] updated dockerfile (#299) * updated dockerfile * add parallel build flag to dockerfile * Adds CI jobs to build our docker container (#302) * Adding a step that at least builds the docker container. I'm not yet sure how I want to actually integrate tests within the container, but at the least we should verify it builds * docker build needs a path. i honestly thought it defaulted to the CWD --------- Co-authored-by: Dax Pryce --- .github/workflows/pr-test.yml | 9 +++++++++ .github/workflows/push-test.yml | 9 +++++++++ Dockerfile | 24 ++++++++++++++---------- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 1326f25fe..d01b691fb 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -1,6 +1,15 @@ name: DiskANN Pull Request Build and Test on: [pull_request] jobs: + docker-container-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Docker build + run: | + docker build . + build-and-run: name: Build and run tests for ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml index cd186af9d..cb9a419b5 100644 --- a/.github/workflows/push-test.yml +++ b/.github/workflows/push-test.yml @@ -24,6 +24,15 @@ jobs: - name: Python Build run: python -m build + docker-container-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Docker build + run: | + docker build . + windows-build: name: Build for ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/Dockerfile b/Dockerfile index 95c5f3494..ea1979f3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,17 @@ -FROM ubuntu:16.04 -MAINTAINER Changxu Wang +#Copyright(c) Microsoft Corporation.All rights reserved. +#Licensed under the MIT license. -RUN apt-get update -y -RUN apt-get install -y g++ cmake libboost-dev libgoogle-perftools-dev +FROM ubuntu:jammy -COPY . /opt/nsg +RUN apt update +RUN apt install -y software-properties-common +RUN add-apt-repository -y ppa:git-core/ppa +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive apt install -y git make cmake g++ libaio-dev libgoogle-perftools-dev libunwind-dev clang-format libboost-dev libboost-program-options-dev libmkl-full-dev libcpprest-dev python3.10 -WORKDIR /opt/nsg - -RUN mkdir -p build && cd build && \ - cmake -DCMAKE_BUILD_TYPE=Release .. && \ - make -j $(nproc) +WORKDIR /app +RUN git clone https://github.com/microsoft/DiskANN.git +WORKDIR /app/DiskANN +RUN mkdir build +RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release +RUN cmake --build build -- -j