Skip to content

Commit

Permalink
118/feature/docker-ci (#120)
Browse files Browse the repository at this point in the history
* Working on docker ci

* Added workflow_dispatch

* Updates

---------

Co-authored-by: AaronYoung5 <[email protected]>
  • Loading branch information
AaronYoung5 and AaronYoung5 authored Nov 21, 2023
1 parent d4dcb68 commit 50dca0f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build-docker-images

on:
push:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [vnc, dev, chrono]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/bake-action@v4
with:
push: True
files: atk.yml
targets: ${{ matrix.target }}
2 changes: 2 additions & 0 deletions atk.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DOCKERHUB_USERNAME=uwsbel

ROS_DISTRO=humble

DEFAULT_APT_DEPENDENCIES="bash vim git git-lfs python3-pip"
Expand Down
20 changes: 15 additions & 5 deletions atk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ x-optionals:
name: art
services:
common:
env_file: "atk.env"
build:
context: "./"
network: "host"
Expand All @@ -43,7 +44,7 @@ services:
tty: true
dev:
extends: common
image: "atk/${COMPOSE_PROJECT_NAME}:dev"
image: "${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:dev"
hostname: "${COMPOSE_PROJECT_NAME}-dev"
container_name: "${COMPOSE_PROJECT_NAME}-dev"
build:
Expand All @@ -55,6 +56,15 @@ services:
USER_SHELL_ADD_ONS: ". /home/${COMPOSE_PROJECT_NAME}/${COMPOSE_PROJECT_NAME}/workspace/install/setup.bash"
PIP_REQUIREMENTS: "${DEFAULT_PIP_REQUIREMENTS} tensorrt"
ROSDEP_METAPACKAGE: "art_dev_meta"
x-bake:
platforms:
- linux/amd64
- linux/arm64
- darwin/amd64
- darwin/arm64
- windows/amd64
- windows/arm64
no-cache: true
working_dir: "/home/${COMPOSE_PROJECT_NAME}/${COMPOSE_PROJECT_NAME}/workspace"
agx:
extends: dev
Expand All @@ -68,7 +78,7 @@ services:
ROSDEP_SKIP_KEYS: "python3-torchvision tf_transformations"
art5:
extends: agx
image: "atk/${COMPOSE_PROJECT_NAME}:art5"
image: "${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:art5"
hostname: "${COMPOSE_PROJECT_NAME}-art5"
container_name: "${COMPOSE_PROJECT_NAME}-art5"
build:
Expand All @@ -77,7 +87,7 @@ services:
ROSDEP_METAPACKAGE: "art_art5_meta"
oak:
extends: agx
image: "atk/${COMPOSE_PROJECT_NAME}:oak"
image: "${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:oak"
hostname: "${COMPOSE_PROJECT_NAME}-oak"
container_name: "${COMPOSE_PROJECT_NAME}-oak"
build:
Expand All @@ -86,7 +96,7 @@ services:
ROSDEP_METAPACKAGE: "art_oak_meta"
chrono:
extends: common
image: "atk/${COMPOSE_PROJECT_NAME}:chrono"
image: "${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:chrono"
hostname: "${COMPOSE_PROJECT_NAME}-chrono"
container_name: "${COMPOSE_PROJECT_NAME}-chrono"
build:
Expand All @@ -100,7 +110,7 @@ services:
CHRONO_BRANCH: "feature/ros"
working_dir: "/home/${COMPOSE_PROJECT_NAME}/${COMPOSE_PROJECT_NAME}/sim"
vnc:
image: "atk/${COMPOSE_PROJECT_NAME}:vnc"
image: "${DOCKERHUB_USERNAME}/${COMPOSE_PROJECT_NAME}:vnc"
hostname: "${COMPOSE_PROJECT_NAME}-vnc"
container_name: "${COMPOSE_PROJECT_NAME}-vnc"
build:
Expand Down

0 comments on commit 50dca0f

Please sign in to comment.