Skip to content

Commit

Permalink
Add Dockerfile for VLFM
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuguangw committed Oct 15, 2023
1 parent 4a84511 commit b5674bc
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 50 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/docker.yml
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
19 changes: 0 additions & 19 deletions .github/workflows/pre_commit.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/test.yml

This file was deleted.

40 changes: 40 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install --no-install-recommends -qy curl apt-transport-https \
sudo ca-certificates git \
libgl1-mesa-dev libjpeg-dev libglm-dev libgl1-mesa-glx \
libegl1-mesa-dev mesa-utils xorg-dev freeglut3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean all

RUN add-apt-repository ppa:deadsnakes/ppa -y \
&& apt-get update \
&& apt-get install --no-install-recommends -qy python3.9-dev python3-pip \
&& 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 \
git+https://github.com/naokiyokoyama/frontier_exploration.git \
git+https://github.com/ChaoningZhang/MobileSAM.git \
git+https://github.com/naokiyokoyama/depth_camera_filtering \
pre-commit>=3.1.1 \
pytest>=7.2.1 \
pytest-cov>=4.0.0 \
git+https://github.com/facebookresearch/[email protected] \
habitat-baselines==0.2.420230405 \
habitat-lab==0.2.420230405 \
git+https://github.com/naokiyokoyama/bd_spot_wrapper.git \
bosdyn-client>=3.3.2 \
bosdyn-api>=3.3.2 \
six>=1.16.0

0 comments on commit b5674bc

Please sign in to comment.