forked from skypilot-org/skypilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
managed_spot_with_storage.yaml
57 lines (42 loc) · 1.22 KB
/
managed_spot_with_storage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# A managed spot example with storages.
#
# Runs a task that has SkyPilot Storage configured.
#
# Usage:
# sky spot launch -c spot-storage examples/managed_spot_with_storage.yaml
# sky down spot-storage
resources:
cloud: aws
use_spot: true
spot_recovery: failover
workdir: ./examples
file_mounts:
~/bucket_workdir:
# Change this to the your own globally unique bucket name.
name: sky-workdir-zhwu
source: ./examples
persistent: false
mode: COPY
/imagenet-image:
source: s3://sky-imagenet-data
# File mounts for folder
/tmp/workdir: ~/tmp-workdir
# File mounts for file
~/tmpfile: ~/tmpfile
~/a/b/c/tmpfile: ~/tmpfile
# Intermediate dirs are created and chown-ed to $USER if they don't already
# exist. Thus they can be used too, e.g., 'mkdir -p /data/logs'. See 'run'.
/data/checkpoints/best.pt: ~/tmpfile
~/.ssh/id_rsa.pub: ~/.ssh/id_rsa.pub
run: |
set -ex
ls ~/sky_workdir/managed_spot_with_storage.yaml
ls ~/bucket_workdir/managed_spot_with_storage.yaml
ls -l /imagenet-image/datasets
mkdir -p /data/logs
touch /data/logs/test.log
touch /data/checkpoints/last.pt
echo hi >> /tmp/workdir/new_file
ls -al /tmp/workdir
cat ~/tmpfile
cat ~/a/b/c/tmpfile