Skip to content

Nv-Ingest Nightly Container Publish #1570

Nv-Ingest Nightly Container Publish

Nv-Ingest Nightly Container Publish #1570

name: Nv-Ingest Nightly Container Publish
# Trigger for pull requests and pushing to main
on:
schedule:
# Runs every day at 11:30PM (UTC)
- cron: "30 23 * * *"
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: linux-large-disk
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: Get current date (yyyy.mm.dd)
run: echo "CURRENT_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
# Set up QEMU emulation for arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Set up Docker Buildx, useful for building multi-platform images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Login to NGC
- name: Log in to NGC Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login nvcr.io --username "\$oauthtoken" --password-stdin
- name: Create HF token file
run: |
mkdir -p ./scripts/private_local
echo "${{ secrets.HF_ACCESS_TOKEN }}" > ./scripts/private_local/hf_token.txt
# Build the Docker image using the Dockerfile
- name: Build Docker image
run: |
docker buildx create --use
docker buildx build --platform linux/amd64 --push --target runtime --build-arg GIT_COMMIT=${GITHUB_SHA} --build-arg DOWNLOAD_LLAMA_TOKENIZER=True --secret id=hf_token,src=./scripts/private_local/hf_token.txt -t ${{ secrets.DOCKER_REGISTRY }}/nv-ingest:${{ env.CURRENT_DATE }} .
- name: Cleanup HF token file
if: always()
run: rm -f ./scripts/private_local/hf_token.txt