first test with registry mirror

This commit is contained in:
Guillaume LEGENDRE 2024-06-25 17:12:50 +02:00
parent 4327210e6b
commit 2670d2d4e8
2 changed files with 23 additions and 22 deletions

View File

@ -70,12 +70,12 @@ jobs:
echo "LABEL=${label_extension}" >> $GITHUB_ENV echo "LABEL=${label_extension}" >> $GITHUB_ENV
echo "DOCKER_DEVICES=${docker_devices}" >> $GITHUB_ENV echo "DOCKER_DEVICES=${docker_devices}" >> $GITHUB_ENV
echo "RUNS_ON=${runs_on}" >> $GITHUB_ENV echo "RUNS_ON=${runs_on}" >> $GITHUB_ENV
- name: Tailscale # - name: Tailscale
uses: huggingface/tailscale-action@main # uses: huggingface/tailscale-action@main
with: # with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }} # authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
slackChannel: ${{ secrets.SLACK_CIFEEDBACK_CHANNEL }} # slackChannel: ${{ secrets.SLACK_CIFEEDBACK_CHANNEL }}
slackToken: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} # slackToken: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
- name: Initialize Docker Buildx - name: Initialize Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
@ -90,12 +90,12 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to internal Container Registry # - name: Login to internal Container Registry
uses: docker/login-action@v3 # uses: docker/login-action@v3
with: # with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }} # username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }} # password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech # registry: registry.internal.huggingface.tech
- name: Login to Azure Container Registry - name: Login to Azure Container Registry
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -110,7 +110,7 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
registry.internal.huggingface.tech/api-inference/community/text-generation-inference registry.github-runners.huggingface.tech/api-inference/community/text-generation-inference
tags: | tags: |
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }} type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}
# If main, release or tag # If main, release or tag
@ -122,7 +122,7 @@ jobs:
flavor: | flavor: |
latest=auto latest=auto
images: | images: |
registry.internal.huggingface.tech/api-inference/community/text-generation-inference registry.github-runners.huggingface.tech/api-inference/community/text-generation-inference
ghcr.io/huggingface/text-generation-inference ghcr.io/huggingface/text-generation-inference
db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation-inference db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation-inference
tags: | tags: |
@ -143,12 +143,12 @@ jobs:
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }} DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}
tags: ${{ steps.meta.outputs.tags || steps.meta-pr.outputs.tags }} tags: ${{ steps.meta.outputs.tags || steps.meta-pr.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }} labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min cache-from: type=gha,scope=cache-${{ env.LABEL }},mode=min
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min cache-to: type=gha,scope=cache-${{ env.LABEL }},mode=min
- name: Final - name: Final
id: final id: final
run: | run: |
echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:sha-${{ env.GITHUB_SHA_SHORT}}${{ env.LABEL }}" >> "$GITHUB_OUTPUT" echo "docker_image=registry.github-runners.huggingface.tech/api-inference/community/text-generation-inference:sha-${{ env.GITHUB_SHA_SHORT}}${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
echo "docker_devices=${{ env.DOCKER_DEVICES }}" >> "$GITHUB_OUTPUT" echo "docker_devices=${{ env.DOCKER_DEVICES }}" >> "$GITHUB_OUTPUT"
echo "runs_on=${{ env.RUNS_ON }}" >> "$GITHUB_OUTPUT" echo "runs_on=${{ env.RUNS_ON }}" >> "$GITHUB_OUTPUT"
echo "label=${{ env.LABEL }}" >> "$GITHUB_OUTPUT" echo "label=${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
@ -173,11 +173,11 @@ jobs:
- name: Install - name: Install
run: | run: |
make install-integration-tests make install-integration-tests
- name: Tailscale # - name: Tailscale
uses: huggingface/tailscale-action@main # uses: huggingface/tailscale-action@main
if: needs.build-and-push.outputs.runs_on != 'amd-gpu-tgi' # if: needs.build-and-push.outputs.runs_on != 'amd-gpu-tgi'
with: # with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }} # authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
- name: Run tests - name: Run tests
run: | run: |
export DOCKER_VOLUME=/mnt/cache export DOCKER_VOLUME=/mnt/cache

View File

@ -4,6 +4,7 @@ on:
push: push:
branches: branches:
- 'main' - 'main'
- 'ci-test'
tags: tags:
- 'v*' - 'v*'
pull_request: pull_request: