Skip to content

Commit

Permalink
fix: Add resource requirements (kaito-project#227)
Browse files Browse the repository at this point in the history
NVIDIA Device Plugin requires `resources` to set up container
environment to correctly interface with GPUs

---------

Co-authored-by: Fei Guo <[email protected]>
  • Loading branch information
ishaansehgal99 and Fei-Guo authored Feb 1, 2024
1 parent 3b7eebe commit fbdd2ec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-preset-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
MATRIX=$(yq e -o=json '.models' presets/models/supported_models.yaml | jq -c)
# Read the additional configurations from e2e-preset-configs.json
CONFIGS=$(cat .github/workflows/e2e-preset-configs.json | jq -c '.matrix.image')
CONFIGS=$(cat .github/e2e-preset-configs.json | jq -c '.matrix.image')
# Pseudocode for combining matrices
# COMBINED_MATRIX = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
- /bin/sh
- -c
- accelerate launch --num_processes 1 --num_machines 1 --machine_rank 0 --gpu_ids all inference-api.py --pipeline text-generation --torch_dtype bfloat16
resources:
requests:
nvidia.com/gpu: 4
limits:
nvidia.com/gpu: 4 # Requesting 4 GPUs
livenessProbe:
httpGet:
path: /healthz
Expand Down
5 changes: 5 additions & 0 deletions presets/test/manifests/falcon-40b/falcon-40b-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
- /bin/sh
- -c
- accelerate launch --num_processes 1 --num_machines 1 --machine_rank 0 --gpu_ids all inference-api.py --pipeline text-generation --torch_dtype bfloat16
resources:
requests:
nvidia.com/gpu: 4
limits:
nvidia.com/gpu: 4 # Requesting 4 GPUs
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
- /bin/sh
- -c
- accelerate launch --num_processes 1 --num_machines 1 --machine_rank 0 --gpu_ids all inference-api.py --pipeline text-generation --torch_dtype bfloat16
resources:
requests:
nvidia.com/gpu: 2
limits:
nvidia.com/gpu: 2 # Requesting 2 GPUs
livenessProbe:
httpGet:
path: /healthz
Expand Down
5 changes: 5 additions & 0 deletions presets/test/manifests/falcon-7b/falcon-7b-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
- /bin/sh
- -c
- accelerate launch --num_processes 1 --num_machines 1 --machine_rank 0 --gpu_ids all inference-api.py --pipeline text-generation --torch_dtype bfloat16
resources:
requests:
nvidia.com/gpu: 2
limits:
nvidia.com/gpu: 2 # Requesting 2 GPUs
livenessProbe:
httpGet:
path: /healthz
Expand Down

0 comments on commit fbdd2ec

Please sign in to comment.