Skip to content

Commit

Permalink
update GPU stat
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali committed Aug 11, 2023
1 parent 62cf267 commit b5ece8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deeplearning-nvidia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: echo ::set-output name=sha_short::$(git rev-parse --short HEAD)

- name: update coder template
uses: matifali/update-coder-template@latest
uses: matifali/update-coder-template@v2
with:
CODER_URL: ${{ vars.CODER_URL }}
CODER_TEMPLATE_NAME: "deeplearning-nvidia"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deeplearning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: echo ::set-output name=sha_short::$(git rev-parse --short HEAD)

- name: update coder template
uses: matifali/update-coder-template@latest
uses: matifali/update-coder-template@v2
with:
CODER_URL: ${{ vars.CODER_URL }}
CODER_TEMPLATE_NAME: "deeplearning"
Expand Down
4 changes: 2 additions & 2 deletions matlab/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ resource "coder_agent" "main" {
interval = 10
key = "4_gpu_usage"
script = <<EOT
nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{printf "%s%%", $1}'
(nvidia-smi 1> /dev/null 2> /dev/null) && (nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{printf "%s%%", $1}') || echo "N/A"
EOT
}

Expand All @@ -143,7 +143,7 @@ resource "coder_agent" "main" {
interval = 10
key = "5_gpu_memory_usage"
script = <<EOT
nvidia-smi --query-gpu=utilization.memory --format=csv,noheader,nounits | awk '{printf "%s%%", $1}'
(nvidia-smi 1> /dev/null 2> /dev/null) && (nvidia-smi --query-gpu=utilization.memory --format=csv,noheader,nounits | awk '{printf "%s%%", $1}') || echo "N/A"
EOT
}

Expand Down

0 comments on commit b5ece8e

Please sign in to comment.