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:
workflow_dispatch:
push:
branches: [rknn-toolkit2]
branches: [main]
pull_request:
branches: [rknn-toolkit2]
branches: [main]
release:
types: [published]
@ -104,9 +104,18 @@ jobs:
include:
- platforms: linux/amd64,linux/arm64
device: cpu
- platforms: linux/amd64
device: cuda
suffix: -cuda
- platforms: linux/amd64
device: openvino
suffix: -openvino
- platforms: linux/arm64
device: rknn
suffix: -rknn
device: armnn
suffix: -armnn
steps:
- name: Checkout
@ -118,13 +127,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0
# - name: Login to Docker Hub
# # Only push to Docker Hub when making a release
# if: ${{ github.event_name == 'release' }}
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Docker Hub
# Only push to Docker Hub when making a release
if: ${{ github.event_name == 'release' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
@ -144,7 +153,7 @@ jobs:
latest=false
images: |
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: |
# Tag with branch name
type=ref,event=branch,suffix=${{ matrix.suffix }}
@ -209,13 +218,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0
# - name: Login to Docker Hub
# # Only push to Docker Hub when making a release
# if: ${{ github.event_name == 'release' }}
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Docker Hub
# Only push to Docker Hub when making a release
if: ${{ github.event_name == 'release' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
@ -235,7 +244,7 @@ jobs:
latest=false
images: |
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: |
# Tag with branch name
type=ref,event=branch,suffix=${{ matrix.suffix }}
@ -298,4 +307,4 @@ jobs:
run: exit 1
- name: All jobs passed or skipped
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-rknn
ENV ARMNN_PATH=/opt/armnn
COPY ann /opt/ann
RUN mkdir /opt/armnn && \
@ -82,7 +80,6 @@ COPY --from=builder-armnn \
/opt/ann/build.sh \
/opt/armnn/
FROM prod-cpu AS prod-rknn
FROM prod-${DEVICE} AS prod
ARG DEVICE
@ -112,4 +109,4 @@ COPY app .
ENTRYPOINT ["tini", "--"]
CMD ["./start.sh"]
HEALTHCHECK CMD python3 healthcheck.py
HEALTHCHECK CMD python3 healthcheck.py