Skip to content

Commit

Permalink
add temp registry
Browse files Browse the repository at this point in the history
Signed-off-by: Bangqi Zhu <[email protected]>
  • Loading branch information
Bangqi Zhu committed Jun 27, 2024
1 parent 66e3752 commit dd84d86
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ jobs:
env:
REGISTRY: ${{ env.REGISTRY }}
VERSION: ${{ env.VERSION }}

- name: build adapter image
if: ${{ !inputs.isRelease }}
shell: bash
run: |
make docker-build-adapter
env:
REGISTRY: ${{ env.REGISTRY }}

- name: create cluster
shell: bash
Expand Down Expand Up @@ -200,6 +208,7 @@ jobs:
env:
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
RUN_LLAMA_13B: ${{ env.RUN_LLAMA_13B }}
REGISTRY: ${{ env.REGISTRY }}
AI_MODELS_REGISTRY: ${{ secrets.E2E_ACR_AMRT_USERNAME }}.azurecr.io
AI_MODELS_REGISTRY_SECRET: ${{ secrets.E2E_AMRT_SECRET_NAME }}

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ docker-build-kaito: docker-buildx
--pull \
--tag $(REGISTRY)/$(IMG_NAME):$(IMG_TAG) .

.PHONY: docker-build-adapter
docker-build-adapter: docker-buildx
docker buildx build \
--file ./docker/adapter/Dockerfile \
--output=$(OUTPUT_TYPE) \
--platform="linux/$(ARCH)" \
--pull \
--tag $(REGISTRY)/e2e-adapter:0.0.1 .

##@ Deployment

ifndef ignore-not-found
Expand Down
6 changes: 6 additions & 0 deletions docker/adapter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM busybox:latest

RUN mkdir -p /mnt/adapters

COPY docker/adapter/adapter_config.json /mnt/adapters/
COPY docker/adapter/adapter_model.safetensors /mnt/adapters/
29 changes: 29 additions & 0 deletions docker/adapter/adapter_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"alpha_pattern": {},
"auto_mapping": {
"base_model_class": "FalconForCausalLM",
"parent_library": "transformers.models.falcon.modeling_falcon"
},
"base_model_name_or_path": "/workspace/tfs/weights",
"bias": "none",
"fan_in_fan_out": false,
"inference_mode": true,
"init_lora_weights": true,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 8,
"lora_dropout": 0.0,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"r": 8,
"rank_pattern": {},
"revision": null,
"target_modules": [
"query_key_value"
],
"task_type": null,
"use_rslora": false
}
Binary file added docker/adapter/adapter_model.safetensors
Binary file not shown.
6 changes: 4 additions & 2 deletions test/e2e/inference_with_adapters.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ import (
var emptyAdapters = make([]kaitov1alpha1.AdapterSpec, 0)
var DefaultStrength = "1.0"

var fullImageName = os.Getenv("REGISTRY") + "/e2e-adapter:0.0.1"

var validAdapters = []kaitov1alpha1.AdapterSpec{
{
Source: &kaitov1alpha1.DataSource{
Name: "falcon-7b-adapter",
Image: "aimodelsregistrytest.azurecr.io/adapter-falcon-7b-dolly-oai-busybox:0.0.2",
Image: fullImageName,
},
Strength: &DefaultStrength,
},
Expand All @@ -35,7 +37,7 @@ var validAdapters = []kaitov1alpha1.AdapterSpec{
var expectedInitContainers = []corev1.Container{
{
Name: "falcon-7b-adapter",
Image: "aimodelsregistrytest.azurecr.io/adapter-falcon-7b-dolly-oai-busybox:0.0.2",
Image: fullImageName,
},
}

Expand Down

0 comments on commit dd84d86

Please sign in to comment.