Unverified Commit e114d874 authored by OlivierDehaene's avatar OlivierDehaene Committed by GitHub
Browse files

feat(ci): push to AML registry (#56)

parent a0dca443
...@@ -35,6 +35,12 @@ jobs: ...@@ -35,6 +35,12 @@ jobs:
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
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.AZURE_DOCKER_USERNAME }}
password: ${{ secrets.AZURE_DOCKER_PASSWORD }}
registry: db4c2190dd824d1f950f5d1555fbadf0.azurecr.io
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v4.3.0 uses: docker/metadata-action@v4.3.0
...@@ -44,6 +50,7 @@ jobs: ...@@ -44,6 +50,7 @@ jobs:
images: | images: |
ghcr.io/huggingface/text-generation-inference ghcr.io/huggingface/text-generation-inference
registry.internal.huggingface.tech/api-inference/community/text-generation-inference registry.internal.huggingface.tech/api-inference/community/text-generation-inference
db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation-inference
tags: | tags: |
type=semver,pattern={{version}} type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
......
```shell # Azure ML endpoint
docker build . -t db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation:0.1
docker push db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation:0.1 ## Create all resources
```shell
az ml model create -f model.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace az ml model create -f model.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace
az ml online-endpoint create -f endpoint.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace az ml online-endpoint create -f endpoint.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace
az ml online-deployment create -f deployment.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace az ml online-deployment create -f deployment.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace
```
## Update deployment
```shell
az ml online-deployment update -f deployment.yaml -g HuggingFace-BLOOM-ModelPage -w HuggingFace
``` ```
\ No newline at end of file
$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json $schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json
name: bloom-deployment name: bloom-deployment
endpoint_name: bloom-inference endpoint_name: bloom-inference
model: azureml:bloom:1 model: azureml:bloom-safetensors:1
model_mount_path: /var/azureml-model model_mount_path: /var/azureml-model
environment_variables: environment_variables:
HUGGINGFACE_HUB_CACHE: /var/azureml-model/bloom WEIGHTS_CACHE_OVERRIDE: /var/azureml-model/bloom-safetensors
MODEL_ID: bigscience/bloom MODEL_ID: bigscience/bloom
NUM_SHARD: 8 NUM_SHARD: 8
environment: environment:
image: db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation-inference:0.3.1 image: db4c2190dd824d1f950f5d1555fbadf0.azurecr.io/text-generation-inference:0.2.0
inference_config: inference_config:
liveness_route: liveness_route:
port: 80 port: 80
......
$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json $schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: bloom-safetensors name: bloom-safetensors
version: 1 path: /data/bloom-safetensors
path: ./bloom-safetensors
type: custom_model
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment