Skip to content

Commit c1ba69b

Browse files
authored
Create main.yml
1 parent d7bb915 commit c1ba69b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PyTorch Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "0 0 * * *"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.x
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install torch torchvision
26+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/cuda-keyring_1.1-1_all.deb
27+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
28+
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa /" | sudo tee /etc/apt/sources.list.d/cuda.list
29+
sudo apt-get update
30+
sudo apt-get -y install cuda
31+
32+
- name: Checkout code
33+
uses: actions/checkout@v2
34+
35+
- name: Run PyTorch code
36+
run: python main.py

0 commit comments

Comments
 (0)