Skip to content

Commit

Permalink
Merge branch 'main' into build_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jooho authored Jul 13, 2023
2 parents 74622cc + ed205b0 commit 7cc9b4e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/pr-close-image-delete.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
name: Delete quay image on PR closed
on:
pull_request:
types:
- closed
pull_request_target:
types: [ closed ]
branches:
- 'main'
paths-ignore:
- 'LICENSE'
- '**/.gitignore'
- '**.md'
- '**.adoc'
- '*.txt'
- 'Makefile'
- '.github/**'
- 'docs/**'
- 'demo/**'


env:
QUAY_ODH_DASHBOARD_IMAGE_REPO: ${{ secrets.QUAY_ODH_CAIKIT_TGIS_SERVING_IMAGE_REPO }}
QUAY_ODH_CAIKIT_TGIS_SERVING_IMAGE_REPO: ${{ secrets.QUAY_ODH_CAIKIT_TGIS_SERVING_IMAGE_REPO }}

jobs:
delete-pr-quay-image:
Expand All @@ -26,10 +38,10 @@ jobs:
QUAY_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_ROBOT_USERNAME }}
run: |
skopeo login quay.io -u ${QUAY_ROBOT_USERNAME} -p ${QUAY_TOKEN}
skopeo login quay.io -u "$QUAY_ROBOT_USERNAME" -p "$QUAY_TOKEN"
- name: Delete PR image
shell: bash
env:
PR: ${{ github.event.pull_request.number }}
run: |
skopeo delete docker://${QUAY_CAIKIT_TGIS_SERVING_IMAGE_REPO}:pr-${{ env.PR }}
skopeo delete docker://${QUAY_ODH_CAIKIT_TGIS_SERVING_IMAGE_REPO}:pr-${PR}
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ RUN yum -y install git && \
pip install pipenv && \
pipenv install --system && \
mkdir -p /opt/models && \
adduser caikit && \
chown -R caikit:caikit /caikit /opt/models
adduser -g 0 -u 1001 caikit && \
chown -R 1001:0 /caikit /opt/models && \
chmod -R g=u /caikit /opt/models

USER caikit
USER 1001

ENV RUNTIME_LIBRARY='caikit_nlp' \
RUNTIME_LOCAL_MODELS_DIR='/opt/models'
Expand Down

0 comments on commit 7cc9b4e

Please sign in to comment.