diff --git a/.github/workflows/Dockerfile.OpenEB b/.github/workflows/Dockerfile.OpenEB new file mode 100644 index 000000000..edcd3173c --- /dev/null +++ b/.github/workflows/Dockerfile.OpenEB @@ -0,0 +1,49 @@ +# This is the command to build the Docker image for Ubuntu 20.04 +# 'docker build --build-arg UBUNTU_VERSION=20.04 -t openeb:ubuntu-20.04 .' +# If you want to build for Ubuntu 22.04, replace "20.04" to "22.04" + +ARG UBUNTU_VERSION=20.04 +FROM ubuntu:${UBUNTU_VERSION} + +ENV DEBIAN_FRONTEND "noninteractive" +ENV TZ "Europe/Paris" + +# Install dependencies +RUN apt-get update && apt-get -y install \ + apt-utils \ + build-essential \ + software-properties-common \ + wget \ + unzip \ + curl \ + git \ + cmake \ + libopencv-dev \ + libboost-all-dev \ + libusb-1.0-0-dev \ + libprotobuf-dev \ + protobuf-compiler \ + libhdf5-dev \ + hdf5-tools \ + libglew-dev \ + libglfw3-dev \ + libcanberra-gtk-module \ + ffmpeg \ + libgtest-dev \ + libgmock-dev \ + python3-pip \ + python3-distutils \ + python3-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN python3 -m pip install pip --upgrade \ + && python3 -m pip install "opencv-python==4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" "h5py==3.7.0" pandas scipy jupyter jupyterlab matplotlib "ipywidgets==7.6.5" pytest command_runner "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning==1.8.6" "tqdm==4.63.0" "kornia==0.6.8" \ + && rm -rf ~/.cache/pip/* + +RUN wget https://github.com/pybind/pybind11/archive/v2.6.0.zip \ + && unzip v2.6.0.zip \ + && cd pybind11-2.6.0 \ + && mkdir build && cd build \ + && cmake .. -DPYBIND11_TEST=OFF \ + && cmake --build . \ + && cmake --build . --target install \ \ No newline at end of file diff --git a/.github/workflows/all_jobs.yaml b/.github/workflows/all_jobs.yaml index 10ddc4b3d..78b89a116 100644 --- a/.github/workflows/all_jobs.yaml +++ b/.github/workflows/all_jobs.yaml @@ -13,35 +13,21 @@ env: python_executable: "C:/hostedtoolcache/windows/Python/3.8.10/x64/python.exe" #Cmake needs this to find python on windows jobs: + container-test-job: + runs-on: ubuntu-20.04 + steps: + - name: Adjust Dockerfile permissions + run: chmod 644 .github/workflows/Dockerfile.OpenEB + container: + image: .github/workflows/Dockerfile.OpenEB job1: + needs: container-test-job name: Ubuntu 20 runs-on: ubuntu-20.04 steps: - name: Checkout Repository uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt-get -y update && sudo apt-get install -y sudo apt-utils wget cmake build-essential \ - libglew-dev git g++ libusb-1.0-0-dev libgtest-dev libgmock-dev libssl-dev python3.8 \ - python3-pip python3-distutils xvfb libglfw3 libglfw3-dev libglew-dev libopencv-dev ffmpeg \ - libboost-dev libboost-program-options-dev libboost-filesystem-dev libboost-timer-dev \ - libprotobuf-dev protobuf-compiler \ - libboost-chrono-dev libboost-thread-dev zip unzip git-lfs libhdf5-dev hdf5-tools - pip install $numpy_version pytest opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py protobuf==3.20.3 command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1 - - - name: Build pybind and gtest - run: | - openebfolder=${PWD} - cd .. - wget https://github.com/pybind/pybind11/archive/v$pybind_version.zip - unzip v$pybind_version.zip - cd pybind11-$pybind_version/ - mkdir build && cd build - cmake .. -DPYBIND11_TEST=OFF - cmake --build . --config Release --parallel 4 - sudo make install - - name: Build openEB run: | mkdir build && cd build