Skip to content

Commit

Permalink
Add ability to specify command and working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Raunak Bhagat committed Nov 23, 2024
1 parent 9bf1a8c commit 06c02ba
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/run-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ on:
inputs:
daft_version:
type: string
description: The wheel artifact to use
description: The version of daft to install
required: false
python_version:
type: string
description: The version of python to use
required: false
default: "3.9"
command:
type: string
description: The command to run on the cluster
required: true
working_dir:
type: string
description: The working directory to submit to the cluster
required: false
default: .github/assets

jobs:
run-command:
Expand Down Expand Up @@ -65,7 +74,11 @@ jobs:
- name: Submit job to ray cluster
run: |
source .venv/bin/activate
ray job submit --address http://localhost:8265 -- python -c "print('Hello, world!')"
if [[ '${{ inputs.command }}' -eq '' ]]; then
echo 'Invalid command submitted; command cannot be empty'
exit 1
fi
ray job submit --working-dir ${{ inputs.working_dir }} --address http://localhost:8265 -- ${{ inputs.command }}
- name: Spin down ray cluster
if: always()
run: |
Expand Down

0 comments on commit 06c02ba

Please sign in to comment.