Run Tests with GPU #10
Workflow file for this run
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
name: Run Tests with GPU | |
on: | |
workflow_dispatch: # Allows for manual triggering | |
concurrency: | |
group: run-tests-gpu # Fixed group name to ensure only one instance runs | |
cancel-in-progress: false | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set SSH permissions | |
run: | | |
mkdir -p ~/.ssh | |
chmod 700 ~/.ssh | |
sudo chown $USER:$USER ~/.ssh | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install and configure dstack | |
run: | | |
pip install dstack | |
dstack config --url https://sky.dstack.ai --project ${{ secrets.DSTACK_PROJECT }} --token ${{ secrets.DSTACK_TOKEN }} | |
dstack init | |
- name: Run tests with GPU | |
run: | | |
HF_TOKEN=${{ secrets.HF_TOKEN }} dstack apply -f tests.dstack.yml --force -y |