Skip to content

Commit

Permalink
Publish gen2_develop Docker image
Browse files Browse the repository at this point in the history
Resolves luxonis/depthai#295

Build libusb without udev support in the container since udev is
typically not run inside containers
  • Loading branch information
pamolloy committed Jan 29, 2021
1 parent 9ad4470 commit 52636f4
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docker-hub-g2-devel.yml
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
@@ -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 }}
23 changes: 23 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 52636f4

Please sign in to comment.