-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Dockerfile to pre-build the various dependencies * Updated CI workflow use the new Docker image
- Loading branch information
Showing
5 changed files
with
132 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. | ||
|
||
name: Docker - Build VLFM Docker | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/docker.yml" | ||
- "docker/**" | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- ".github/workflows/docker.yml" | ||
- "docker/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: ghcr.io/bdaiinstitute/bdaii_vlfm | ||
|
||
|
||
jobs: | ||
build: | ||
name: docker_vlfm | ||
|
||
runs-on: | ||
group: bdai-gh-large-runners | ||
permissions: | ||
contents: read | ||
packages: write | ||
# This is used to complete the identity challenge | ||
# with sigstore/fulcio when running outside of PRs. | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Extract metadata (tags, labels) for Docker | ||
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a | ||
with: | ||
context: ./docker | ||
file: ./docker/Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
# Copyright [2023] Boston Dynamics AI Institute, Inc. | ||
|
||
name: ZSOS - Main Build | ||
|
||
name: VLFM CI | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.9.16'] | ||
os: [ubuntu-latest] | ||
vlfm_main_build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
container: | ||
image: ghcr.io/bdaiinstitute/bdaii_vlfm:main | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install package | ||
run: | | ||
sudo apt-get install -y libgl1-mesa-dev | ||
pip install -e .[habitat] | ||
pip install -e .[dev] | ||
- name: Pytest | ||
run: | | ||
pytest test | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -qy curl apt-transport-https gnupg \ | ||
sudo ca-certificates git software-properties-common \ | ||
build-essential \ | ||
libgl1-mesa-dev libjpeg-dev libglm-dev libgl1-mesa-glx \ | ||
libegl1-mesa-dev mesa-utils xorg-dev freeglut3-dev \ | ||
python3.10-dev python3-pip python-is-python3 \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get clean all | ||
|
||
# Install the required Python packages | ||
RUN pip install torch>=1.10.1 \ | ||
numpy>=1.22.4 \ | ||
flask>=2.3.2 \ | ||
seaborn>=0.12.2 \ | ||
open3d>=0.17.0 \ | ||
transformers==4.26.0 \ | ||
salesforce-lavis>=1.0.2 \ | ||
pre-commit>=3.1.1 \ | ||
pytest>=7.2.1 \ | ||
pytest-cov>=4.0.0 \ | ||
habitat-baselines==0.2.420230405 \ | ||
habitat-lab==0.2.420230405 \ | ||
bosdyn-client>=3.3.2 \ | ||
bosdyn-api>=3.3.2 \ | ||
six>=1.16.0 | ||
|
||
RUN pip install git+https://github.com/naokiyokoyama/frontier_exploration.git \ | ||
git+https://github.com/ChaoningZhang/MobileSAM.git \ | ||
git+https://github.com/naokiyokoyama/depth_camera_filtering \ | ||
git+https://github.com/facebookresearch/habitat-sim.git@v0.2.4 \ | ||
git+https://github.com/naokiyokoyama/bd_spot_wrapper.git \ | ||
git+https://github.com/IDEA-Research/GroundingDINO.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters