Skip to content

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
koide3 committed Jul 10, 2024
1 parent ae92cd6 commit 333803c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 40 deletions.
45 changes: 22 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches: [ master ]
paths-ignore: '**.md'
repository_dispatch:
types: [trigger-event]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,45 +19,42 @@ jobs:
strategy:
matrix:
DISTRO: [
{ "base_image": "jammy", "suffix": "gcc" },
{ "base_image": "jammy_cuda12.2", "suffix": "gcc.cuda" }
{ "ubuntu": "jammy", "suffix": "gcc" }
# { "ubuntu": "jammy_cuda12.2", "suffix": "gcc.cuda" }
]

steps:
- uses: actions/checkout@v2
with:
repository: 'https://github.com/koide3/gtsam_points'
path: 'gtsam_points'
token: ${{ secrets.GH_PAT }}
submodules: recursive

- uses: actions/checkout@v2
with:
path: 'glim'
token: ${{ secrets.GH_PAT }}
submodules: recursive

- name: Docker login
continue-on-error: true
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Docker build (gtsam_points)
- name: Docker build
uses: docker/build-push-action@v6
with:
file: ${{github.workspace}}/docker/ubuntu/Dockerfile.${ matrix.DISTRO.suffix }
tags: koide3/glim:${{ matrix.DISTRO.ubuntu }}
file: ${{github.workspace}}/docker/ubuntu/Dockerfile.${{ matrix.DISTRO.suffix }}
build-args: |
BASE_IMAGE=koide3/gtsam_docker:${{ matrix.DISTRO.ubuntu }}
context: gtsam_points
tags: gtsam_points
BASE_IMAGE=koide3/gtsam_points:${{ matrix.DISTRO.ubuntu }}
context: .

- name: Docker build (glim)
uses: docker/build-push-action@v6
dispatch:
needs: build
strategy:
matrix:
repo: ['koide3/glim_ros1', 'koide3/glim_ros2']
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
file: ${{github.workspace}}/docker/ubuntu/Dockerfile.${ matrix.DISTRO.suffix }
build-args: |
BASE_IMAGE=gtsam_points
context: glim
tags: glim
token: ${{ secrets.GH_PAT }}
repository: ${{ matrix.repo }}
event-type: trigger-event
7 changes: 4 additions & 3 deletions docker/ubuntu/Dockerfile.gcc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=gtsam_points
ARG BASE_IMAGE=koide3/gtsam_points:jammy
FROM $BASE_IMAGE

RUN apt-get update \
Expand All @@ -14,8 +14,9 @@ RUN cmake .. \
-DBUILD_WITH_CUDA=OFF \
-DBUILD_WITH_VIEWER=OFF \
-DBUILD_WITH_MARCH_NATIVE=OFF \
-DCMAKE_BUILD_TYPE=Release
RUN make -j$(nproc)
-DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
rm -rf /root/glim/build

# with viewer
WORKDIR /root/glim/build
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/Dockerfile.gcc.cuda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=gtsam_points
ARG BASE_IMAGE=koide3/gtsam_points:jammy_cuda12.2
FROM $BASE_IMAGE

RUN apt-get update \
Expand Down
14 changes: 1 addition & 13 deletions docker/ubuntu/Dockerfile.llvm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=koide3/gtsam_docker:jammy_cuda12.2
ARG BASE_IMAGE=koide3/gtsam_points:jammy
FROM $BASE_IMAGE

RUN apt-get update \
Expand Down Expand Up @@ -28,16 +28,4 @@ RUN CC=clang CXX=clang++ cmake .. \
-DCMAKE_BUILD_TYPE=Release
RUN make -j$(nproc)

# resolve omp_is_initial_device-related errors
RUN sed -i '496{s/^/\/\//}' /usr/lib/llvm-14/lib/clang/14.0.0/include/omp.h

# with CUDA
WORKDIR /root/glim/build
RUN CC=clang CXX=clang++ cmake .. \
-DBUILD_WITH_CUDA=ON \
-DBUILD_WITH_VIEWER=ON \
-DBUILD_WITH_MARCH_NATIVE=OFF \
-DCMAKE_BUILD_TYPE=Release
RUN make -j$(nproc)

CMD ["bash"]

0 comments on commit 333803c

Please sign in to comment.