knox 修订了这个 Gist . 跳至此修订
1 file changed, 19 insertions
SkyPilot-3.yaml(file created)
@@ -0,0 +1,19 @@ | |||
1 | + | resources: | |
2 | + | accelerators: A100:8 # 8x NVIDIA A100 GPU | |
3 | + | ||
4 | + | num_nodes: 1 # Number of VMs to launch | |
5 | + | ||
6 | + | # Working directory (optional) containing the project codebase. | |
7 | + | # Its contents are synced to ~/sky_workdir/ on the cluster. | |
8 | + | workdir: ~/torch_examples | |
9 | + | ||
10 | + | # Commands to be run before executing the job. | |
11 | + | # Typical use: pip install -r requirements.txt, git clone, etc. | |
12 | + | setup: | | |
13 | + | pip install "torch<2.2" torchvision --index-url https://download.pytorch.org/whl/cu121 | |
14 | + | ||
15 | + | # Commands to run as a job. | |
16 | + | # Typical use: launch the main program. | |
17 | + | run: | | |
18 | + | cd mnist | |
19 | + | python main.py --epochs 1 |
更新
更早