This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
pythia
matching, push base image to ghrc.io, remove `modelMount…
…Path`/`cacheMountPath`, merge volumes, update README (#53) Signed-off-by: Hung-Han (Henry) Chen <[email protected]>
- Loading branch information
1 parent
afb5db7
commit 45524c2
Showing
33 changed files
with
121 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and Push Image to Github Container Registry | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.py' | ||
- 'requirements.txt' | ||
- 'Dockerfile' | ||
- '.github/workflows/cpu_image.yaml' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ialacol | ||
jobs: | ||
image_to_gcr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,20 +56,22 @@ jobs: | |
llama-smoke-test: | ||
runs-on: ubuntu-latest | ||
needs: build-image | ||
steps: | ||
steps: | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.0 | ||
|
||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install ialacol with LLaMa based model and wait for pods to be ready | ||
run: | | ||
helm repo add ialacol https://chenhunghan.github.io/ialacol | ||
helm repo update | ||
cat > values.yaml <<EOF | ||
replicas: 1 | ||
deployment: | ||
|
@@ -81,18 +83,11 @@ jobs: | |
TOP_K: 0 | ||
resources: | ||
{} | ||
cache: | ||
persistence: | ||
size: 0.5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
cacheMountPath: /app/cache | ||
model: | ||
persistence: | ||
size: 2Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
modelMountPath: /app/models | ||
service: | ||
type: ClusterIP | ||
port: $LLAMA_SVC_PORT | ||
|
@@ -101,7 +96,7 @@ jobs: | |
tolerations: [] | ||
affinity: {} | ||
EOF | ||
helm install $LLAMA_HELM_RELEASE_NAME ialacol/ialacol -f values.yaml --namespace $HELM_NAMESPACE | ||
helm install $LLAMA_HELM_RELEASE_NAME -f values.yaml --namespace $HELM_NAMESPACE ./charts/ialacol | ||
echo "Wait for the pod to be ready, it takes about 36s to download a 1.93GB model (~50MB/s)" | ||
sleep 40 | ||
|
@@ -151,23 +146,22 @@ jobs: | |
steps: | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install OpenAI CLI | ||
run: | | ||
pip install --upgrade openai --quiet | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install ialacol with gpt-neox based model and wait for pods to be ready | ||
run: | | ||
helm repo add ialacol https://chenhunghan.github.io/ialacol | ||
helm repo update | ||
cat > values.yaml <<EOF | ||
replicas: 1 | ||
deployment: | ||
|
@@ -180,18 +174,11 @@ jobs: | |
REPETITION_PENALTY: 1.176 | ||
resources: | ||
{} | ||
cache: | ||
persistence: | ||
size: 0.5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
cacheMountPath: /app/cache | ||
model: | ||
persistence: | ||
size: 0.5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
modelMountPath: /app/models | ||
service: | ||
type: ClusterIP | ||
port: $GPT_NEOX_SVC_PORT | ||
|
@@ -200,7 +187,7 @@ jobs: | |
tolerations: [] | ||
affinity: {} | ||
EOF | ||
helm install $GPT_NEOX_HELM_RELEASE_NAME ialacol/ialacol -f values.yaml --namespace $HELM_NAMESPACE | ||
helm install $GPT_NEOX_HELM_RELEASE_NAME -f values.yaml --namespace $HELM_NAMESPACE ./charts/ialacol | ||
echo "Wait for the pod to be ready, it takes about 36s to download a 1.93GB model (~50MB/s)" | ||
sleep 40 | ||
|
@@ -227,23 +214,22 @@ jobs: | |
steps: | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install OpenAI CLI | ||
run: | | ||
pip install --upgrade openai --quiet | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install ialacol with starcoder based model and wait for pods to be ready | ||
run: | | ||
helm repo add ialacol https://chenhunghan.github.io/ialacol | ||
helm repo update | ||
cat > values.yaml <<EOF | ||
replicas: 1 | ||
deployment: | ||
|
@@ -256,18 +242,11 @@ jobs: | |
REPETITION_PENALTY: 1.176 | ||
resources: | ||
{} | ||
cache: | ||
persistence: | ||
size: 0.5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
cacheMountPath: /app/cache | ||
model: | ||
persistence: | ||
size: 2Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
modelMountPath: /app/models | ||
service: | ||
type: ClusterIP | ||
port: $STARCODER_SVC_PORT | ||
|
@@ -276,7 +255,7 @@ jobs: | |
tolerations: [] | ||
affinity: {} | ||
EOF | ||
helm install $STARCODER_HELM_RELEASE_NAME ialacol/ialacol -f values.yaml --namespace $HELM_NAMESPACE | ||
helm install $STARCODER_HELM_RELEASE_NAME -f values.yaml --namespace $HELM_NAMESPACE ./charts/ialacol | ||
echo "Wait for the pod to be ready" | ||
sleep 20 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 0.10.1 | ||
appVersion: 0.10.2 | ||
description: A Helm chart for ialacol | ||
name: ialacol | ||
type: application | ||
version: 0.10.1 | ||
version: 0.10.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.