Revert my changes to dockerfiles

This commit is contained in:
yoni13 2025-01-11 10:13:03 +08:00
parent 4d704e9f73
commit a2722e16e7
2 changed files with 31 additions and 25 deletions

View File

@ -3,9 +3,9 @@ name: Docker
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: [rknn-toolkit2] branches: [main]
pull_request: pull_request:
branches: [rknn-toolkit2] branches: [main]
release: release:
types: [published] types: [published]
@ -104,9 +104,18 @@ jobs:
include: include:
- platforms: linux/amd64,linux/arm64 - platforms: linux/amd64,linux/arm64
device: cpu device: cpu
- platforms: linux/amd64
device: cuda
suffix: -cuda
- platforms: linux/amd64
device: openvino
suffix: -openvino
- platforms: linux/arm64 - platforms: linux/arm64
device: rknn device: armnn
suffix: -rknn suffix: -armnn
steps: steps:
- name: Checkout - name: Checkout
@ -118,13 +127,13 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.8.0
# - name: Login to Docker Hub - name: Login to Docker Hub
# # Only push to Docker Hub when making a release # Only push to Docker Hub when making a release
# if: ${{ github.event_name == 'release' }} if: ${{ github.event_name == 'release' }}
# uses: docker/login-action@v3 uses: docker/login-action@v3
# with: with:
# username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -144,7 +153,7 @@ jobs:
latest=false latest=false
images: | images: |
name=ghcr.io/${{ github.repository_owner }}/${{env.image}} name=ghcr.io/${{ github.repository_owner }}/${{env.image}}
# name=altran1502/${{env.image}},enable=${{ github.event_name == 'release' }} name=altran1502/${{env.image}},enable=${{ github.event_name == 'release' }}
tags: | tags: |
# Tag with branch name # Tag with branch name
type=ref,event=branch,suffix=${{ matrix.suffix }} type=ref,event=branch,suffix=${{ matrix.suffix }}
@ -209,13 +218,13 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.8.0
# - name: Login to Docker Hub - name: Login to Docker Hub
# # Only push to Docker Hub when making a release # Only push to Docker Hub when making a release
# if: ${{ github.event_name == 'release' }} if: ${{ github.event_name == 'release' }}
# uses: docker/login-action@v3 uses: docker/login-action@v3
# with: with:
# username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -235,7 +244,7 @@ jobs:
latest=false latest=false
images: | images: |
name=ghcr.io/${{ github.repository_owner }}/${{env.image}} name=ghcr.io/${{ github.repository_owner }}/${{env.image}}
# name=altran1502/${{env.image}},enable=${{ github.event_name == 'release' }} name=altran1502/${{env.image}},enable=${{ github.event_name == 'release' }}
tags: | tags: |
# Tag with branch name # Tag with branch name
type=ref,event=branch,suffix=${{ matrix.suffix }} type=ref,event=branch,suffix=${{ matrix.suffix }}
@ -298,4 +307,4 @@ jobs:
run: exit 1 run: exit 1
- name: All jobs passed or skipped - name: All jobs passed or skipped
if: ${{ !(contains(needs.*.result, 'failure')) }} if: ${{ !(contains(needs.*.result, 'failure')) }}
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"

View File

@ -8,8 +8,6 @@ FROM builder-cpu AS builder-cuda
FROM builder-cpu AS builder-armnn FROM builder-cpu AS builder-armnn
FROM builder-cpu AS builder-rknn
ENV ARMNN_PATH=/opt/armnn ENV ARMNN_PATH=/opt/armnn
COPY ann /opt/ann COPY ann /opt/ann
RUN mkdir /opt/armnn && \ RUN mkdir /opt/armnn && \
@ -82,7 +80,6 @@ COPY --from=builder-armnn \
/opt/ann/build.sh \ /opt/ann/build.sh \
/opt/armnn/ /opt/armnn/
FROM prod-cpu AS prod-rknn
FROM prod-${DEVICE} AS prod FROM prod-${DEVICE} AS prod
ARG DEVICE ARG DEVICE
@ -112,4 +109,4 @@ COPY app .
ENTRYPOINT ["tini", "--"] ENTRYPOINT ["tini", "--"]
CMD ["./start.sh"] CMD ["./start.sh"]
HEALTHCHECK CMD python3 healthcheck.py HEALTHCHECK CMD python3 healthcheck.py