Skip to content

Instantly share code, notes, and snippets.

@matsui528
Created January 15, 2020 14:42
Show Gist options
  • Save matsui528/60249295994939c63c24053feab5e4c5 to your computer and use it in GitHub Desktop.
Save matsui528/60249295994939c63c24053feab5e4c5 to your computer and use it in GitHub Desktop.
name: Run python test on an EC2 GPU instance
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Create EC2 instance
uses: kazuya-iwami/create-aws-ec2-instance@v1
with:
instance_type: p3.16xlarge
ami: ami-07d0cf3af28718ef8
- name: Checkout
uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run test
run: |
pip install pytest
pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment