-
Notifications
You must be signed in to change notification settings - Fork 501
[CI] Package AI Runtime #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
028bd59
feat: add Dockerfile for package runtime and download image
brosoul db71b89
style
brosoul cc791dc
chore: add build image command for downloader and runtime
brosoul afa6d5e
fix: build command
brosoul 9970dc7
doc: add runtime downloader docs
brosoul b195936
fix: build runtime image command
brosoul 4b8f2ab
fix: build command
brosoul 139f277
doc: add runtime download tutorial
brosoul c90e5cf
refact: keep only one image for runtime and downloader
brosoul 3c4b8cc
style
brosoul 007b9bd
unify command
brosoul 796d321
fix
brosoul 13ed6b2
fix: model path use org/model
brosoul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,21 @@ | ||
| # AIBrix Runtime Demo | ||
|
|
||
| ## Model Download | ||
| AIBrix runtime support to download model from different sources. | ||
|
|
||
| - Download model from HuggingFace | ||
| ```shell | ||
| kubectl apply -f runtime-hf-download.yaml | ||
| ``` | ||
|
|
||
| - Download model from AWS S3 | ||
| ```shell | ||
| kubectl apply -f runtime-s3-download.yaml | ||
| ``` | ||
|
|
||
| - Download model from TOS | ||
| ```shell | ||
| kubectl apply -f runtime-tos-download.yaml | ||
| ``` | ||
|
|
||
| ## Metrics Merge |
This file contains hidden or 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,145 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| models.aibricks.com/model-name: deepseek-coder-6.7b-instruct | ||
| name: aibricks-model-deepseek-coder-6.7b-instruct | ||
| namespace: default | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| strategy: | ||
| rollingUpdate: | ||
| maxSurge: 25% | ||
| maxUnavailable: 25% | ||
| type: RollingUpdate | ||
| template: | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| spec: | ||
| containers: | ||
| - command: | ||
| - python3 | ||
| - -m | ||
| - vllm.entrypoints.openai.api_server | ||
| - --host | ||
| - "0.0.0.0" | ||
| - --port | ||
| - "8000" | ||
| - --model | ||
| - /models/deepseek-ai_deepseek-coder-6.7b-instruct | ||
Jeffwan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - --served-model-name | ||
| - deepseek-ai/deepseek-coder-6.7b-instruct | ||
| - --distributed-executor-backend | ||
| - ray | ||
| - --trust-remote-code | ||
| image: vllm/vllm-openai:v0.5.5 | ||
| imagePullPolicy: Always | ||
| livenessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 90 | ||
| periodSeconds: 5 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 1 | ||
| name: vllm-openai | ||
| ports: | ||
| - containerPort: 8000 | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 90 | ||
| periodSeconds: 5 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 1 | ||
| resources: | ||
| limits: | ||
| nvidia.com/gpu: "1" | ||
| requests: | ||
| nvidia.com/gpu: "1" | ||
| # We need to use dataset cache | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| - name: dshm | ||
| mountPath: /dev/shm | ||
| - name: aibrix-runtime | ||
| image: aibrix/aibrix-runtime:latest | ||
| command: | ||
| - bash | ||
| - entrypoint.sh | ||
| ports: | ||
| - containerPort: 8080 | ||
| protocol: TCP | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| initContainers: | ||
| - name: model-init | ||
| image: aibrix/aibrix-downloader:latest | ||
| command: | ||
| - python | ||
Jeffwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - /app/download.py | ||
| - --model-uri | ||
| - deepseek-ai/deepseek-coder-6.7b-instruct | ||
| - --local-dir | ||
| - /models/ | ||
| env: | ||
| - name: DOWNLOADER_MODEL_NAME | ||
| value: deepseek-ai/deepseek-coder-6.7b-instruct | ||
| - name: DOWNLOADER_ALLOW_FILE_SUFFIX | ||
| value: json, safetensors | ||
| - name: HF_TOKEN | ||
| value: <input your hf token, if needed> | ||
| - name: HF_ENDPOINT | ||
| value: <input your hf endpoint, if needed> | ||
| - name: HF_REVISION | ||
| value: <input your mdoel revision, if needed> | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| volumes: | ||
| - emptyDir: {} | ||
| name: model-hostpath | ||
| - name: dshm | ||
| emptyDir: | ||
| medium: Memory | ||
| sizeLimit: "10Gi" | ||
|
|
||
| --- | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| prometheus-discovery: "true" | ||
| annotations: | ||
| prometheus.io/scrape: "true" | ||
| prometheus.io/port: "8080" | ||
| name: aibricks-model-deepseek-coder-6-7b-instruct-svc | ||
| namespace: default | ||
| spec: | ||
| ports: | ||
| - name: serve | ||
| port: 8000 | ||
| protocol: TCP | ||
| targetPort: 8000 | ||
| - name: http | ||
| port: 8080 | ||
| protocol: TCP | ||
| targetPort: 8080 | ||
| selector: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| type: ClusterIP | ||
This file contains hidden or 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,147 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| models.aibricks.com/model-name: deepseek-coder-6.7b-instruct | ||
| name: aibricks-model-deepseek-coder-6.7b-instruct | ||
| namespace: default | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| strategy: | ||
| rollingUpdate: | ||
| maxSurge: 25% | ||
| maxUnavailable: 25% | ||
| type: RollingUpdate | ||
| template: | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| spec: | ||
| containers: | ||
| - command: | ||
| - python3 | ||
| - -m | ||
| - vllm.entrypoints.openai.api_server | ||
| - --host | ||
| - "0.0.0.0" | ||
| - --port | ||
| - "8000" | ||
| - --model | ||
| - /models/deepseek-ai_deepseek-coder-6.7b-instruct | ||
| - --served-model-name | ||
| - deepseek-ai/deepseek-coder-6.7b-instruct | ||
| - --distributed-executor-backend | ||
| - ray | ||
| - --trust-remote-code | ||
| image: vllm/vllm-openai:v0.5.5 | ||
| imagePullPolicy: Always | ||
| livenessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 90 | ||
| periodSeconds: 5 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 1 | ||
| name: vllm-openai | ||
| ports: | ||
| - containerPort: 8000 | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 90 | ||
| periodSeconds: 5 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 1 | ||
| resources: | ||
| limits: | ||
| nvidia.com/gpu: "1" | ||
| requests: | ||
| nvidia.com/gpu: "1" | ||
| # We need to use dataset cache | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| - name: dshm | ||
| mountPath: /dev/shm | ||
| - name: aibrix-runtime | ||
| image: aibrix/aibrix-runtime:latest | ||
| command: | ||
| - bash | ||
| - entrypoint.sh | ||
| ports: | ||
| - containerPort: 8080 | ||
| protocol: TCP | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| initContainers: | ||
| - name: model-init | ||
| image: aibrix/aibrix-downloader:latest | ||
| command: | ||
| - python | ||
| - /app/download.py | ||
| - --model-uri | ||
| - s3://<input your s3 bucket name>/<input your s3 bucket path> | ||
| - --local-dir | ||
| - /models/ | ||
| env: | ||
| - name: DOWNLOADER_MODEL_NAME | ||
| value: deepseek-ai/deepseek-coder-6.7b-instruct | ||
| - name: DOWNLOADER_ALLOW_FILE_SUFFIX | ||
| value: json, safetensors | ||
| - name: AWS_ACCESS_KEY_ID | ||
| value: <input your s3 access key> | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| value: <input your s3 secret key> | ||
| - name: AWS_ENDPOINT_URL | ||
| value: <input your s3 endpoint> | ||
| - name: AWS_REGION | ||
| value: <input your s3 region> | ||
| volumeMounts: | ||
| - mountPath: /models | ||
| name: model-hostpath | ||
| volumes: | ||
| - emptyDir: {} | ||
| name: model-hostpath | ||
| - name: dshm | ||
| emptyDir: | ||
| medium: Memory | ||
| sizeLimit: "10Gi" | ||
|
|
||
| --- | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| labels: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| prometheus-discovery: "true" | ||
| annotations: | ||
| prometheus.io/scrape: "true" | ||
| prometheus.io/port: "8080" | ||
| name: aibricks-model-deepseek-coder-6-7b-instruct-svc | ||
| namespace: default | ||
| spec: | ||
| ports: | ||
| - name: serve | ||
| port: 8000 | ||
| protocol: TCP | ||
| targetPort: 8000 | ||
| - name: http | ||
| port: 8080 | ||
| protocol: TCP | ||
| targetPort: 8080 | ||
| selector: | ||
| models.aibricks.ai: deepseek-coder-6.7b-instruct | ||
| type: ClusterIP |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.