skypilot
1name: gpu-task1
2
3resources:
4# Optional; if left out, automatically pick the cheapest cloud.
5cloud: oci
6
7accelerators: A10:1 # 1x NVIDIA A10 GPU
8
9region: ap-seoul-1
10
11# zone: AP-SEOUL-1-AD-1
12
13# instance_type: VM.GPU.A10.1
14
15# image_id: skypilot:gpu-ubuntu-2004
16
17# Working directory (optional) containing the project codebase.
18# Its contents are synced to ~/sky_workdir/ on the cluster.
19# For example, prepare the workdir by cloning:
20# git clone https://github.com/pytorch/examples.git ~/torch_examples
21workdir: ~/torch_examples
22
23num_nodes: 1
24
25# Typical use: pip install -r requirements.txt
26# Invoked under the workdir (i.e., can use its files).
27setup: |
28echo "*** Running setup. ***"
29pip install torch torchvision
30
31# Typical use: make use of resources, such as running training.
32# Invoked under the workdir (i.e., can use its files).
33run: |
34echo "*** Running the task on OCI ***"
35cd mnist
36python main.py --epochs 1
37echo "The task is completed."
38