Skip to content

Commit

Permalink
[MV-1829][DEV] Test dockerfile for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
esecondy-psee committed Feb 5, 2024
1 parent 2c9c78d commit 66de3f5
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 25 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/Dockerfile.OpenEB
Original file line number Diff line number Diff line change
@@ -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 \
41 changes: 16 additions & 25 deletions .github/workflows/all_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,26 @@ 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: Checkout Repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: docker build -t openeb:ubuntu-20.04 -f .github/workflows/Dockerfile.OpenEB .

job1:
name: Ubuntu 20
needs: container-test-job
runs-on: ubuntu-20.04
container:
image: .github/workflows/Dockerfile.OpenEB
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
Expand Down

0 comments on commit 66de3f5

Please sign in to comment.