diff --git a/.github/workflows/docker-hub-g2-devel.yml b/.github/workflows/docker-hub-g2-devel.yml new file mode 100644 index 000000000..70436b55f --- /dev/null +++ b/.github/workflows/docker-hub-g2-devel.yml @@ -0,0 +1,25 @@ +name: Publish Docker image +on: + push: + branches: + - gen2_develop +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: true + file: ci/Dockerfile + tags: luxonis/depthai-library:latest diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml new file mode 100644 index 000000000..d0d214d4d --- /dev/null +++ b/.github/workflows/docker-hub.yml @@ -0,0 +1,24 @@ +name: Publish Docker image +on: + push: + tags: +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + push: true + file: ci/Dockerfile + tags: luxonis/depthai-library:${{ env.GITHUB_REF }} diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 000000000..d780d7ebc --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,23 @@ +FROM luxonis/depthai-base:latest + +RUN apt install wget +RUN wget https://github.com/libusb/libusb/releases/download/v1.0.24/libusb-1.0.24.tar.bz2 +RUN tar xf libusb-1.0.24.tar.bz2 +RUN cd libusb-1.0.24 && \ + ./configure --disable-udev && \ + make -j && make install + +RUN pip install opencv-python + +COPY . /depthai-python +RUN mkdir -p depthai-python/build +RUN cd /depthai-python && \ + git submodule update --init --recursive && \ + cd build && \ + cmake .. && \ + make -j +ENV PYTHONPATH=/depthai-python/build + +RUN mkdir -p /depthai-python/examples/models/ +RUN cd /depthai-python/examples/models/ && \ + wget https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet.blob