From 3ab64ab709ae758f55b318abd02a6d24493a6498 Mon Sep 17 00:00:00 2001 From: AnthonyYao7 <47165983+AnthonyYao7@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:36:22 -0400 Subject: [PATCH 1/5] Create build.yml --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1e3dc08 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build image + +on: + push: + branches: [ main, master ] + tags: + - "*" + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for image builder + uses: docker/metadata-action@v4 + id: meta + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push container image + uses: docker/build-push-action@v3 + with: + context: . + push: true + platforms: linux/arm64/v8 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 44cb2e8b5d2d02c5a6b543eca432cf0aff158d77 Mon Sep 17 00:00:00 2001 From: raspberrysir <141175376+raspberrysir@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:43:23 -0400 Subject: [PATCH 2/5] added requirements.txt --- requirements.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a6fa15f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +matplotlib +cv2 +numpy +serial +list_ports From d2306bf1579a3dd219c38bf95ad3949a5cc74d63 Mon Sep 17 00:00:00 2001 From: raspberrysir <141175376+raspberrysir@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:46:15 -0400 Subject: [PATCH 3/5] updated requirements.txt --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index a6fa15f..8153502 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ matplotlib -cv2 +opencv-python numpy serial -list_ports From ef32217a022fdeedf2712cc19a1f9eb20b2d0627 Mon Sep 17 00:00:00 2001 From: AnthonyYao7 <47165983+AnthonyYao7@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:46:26 -0400 Subject: [PATCH 4/5] Create Dockerfile --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f24f83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.9-slim + + +RUN apt-get update -y +RUN apt-get upgrade -y +RUN apt-get install ffmpeg libsm6 libxext6 -y + +COPY requirements.txt requirements.txt +RUN python3 -m pip install -r requirements.txt + +COPY . . + +CMD ["python3", "main.py"] From 6bb0c413b95e13d9af822d8e164d8b7c7228bfaf Mon Sep 17 00:00:00 2001 From: AnthonyYao7 <47165983+AnthonyYao7@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:46:57 -0400 Subject: [PATCH 5/5] Create main.py --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..169247e --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +def main(): + pass + + +if __name__ == "__main__": + main()