forked from foundation-model-stack/fms-hf-tuning
-
Notifications
You must be signed in to change notification settings - Fork 7
30 lines (29 loc) · 1.09 KB
/
image.yaml
File metadata and controls
30 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Image
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Free up disk space"
uses: ./.github/actions/free-up-disk-space
- name: Build NVCR dev Image
run: |
docker build -t ${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:main-nvcr-latest . -f build/nvcr.Dockerfile
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Run basic sanity checks/tests on the new image before pushing
run: |
echo 'check if accelerate is installed and in the PATH'
IMAGE_NAME=${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:main-nvcr-latest
docker run --rm -it --entrypoint which "$IMAGE_NAME" accelerate
echo 'checks done'
- name: Push docker image for every commit to Quay.io as dev images
run: |
docker push ${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:main-nvcr-latest