-
Notifications
You must be signed in to change notification settings - Fork 2
/
live.yml
133 lines (120 loc) · 3.29 KB
/
live.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
kind: live
title: Example config
defaults:
# preset: gpu-small
preset: cpu-small
volumes:
data:
remote: storage:$[[ flow.project_id ]]/data
mount: /project/data
local: data
read_only: True
code:
remote: storage:${{ flow.project_id }}/modules
mount: /project/modules
local: modules
config:
remote: storage:${{ flow.project_id }}/config
mount: /project/config
local: config
notebooks:
remote: storage:${{ flow.project_id }}/notebooks
mount: /project/notebooks
local: notebooks
results:
remote: storage:${{ flow.project_id }}/results
mount: /project/results
local: results
project:
remote: storage:${{ flow.project_id }}
mount: /project
read_only: True
images:
img:
ref: image:${{ flow.project_id }}:v1.0
dockerfile: ${{ flow.workspace }}/Dockerfile
context: ${{ flow.workspace }}
jobs:
test:
image: ubuntu
restart: "${{ 'on-failure' }}"
# ${{ flow.id }} calculation displays a yellow warning for deprecated flow.id attr
cmd: echo ${{ flow.id }}
bash:
image: ubuntu
py:
image: python:latest
python: |
import sys
print("Hello!!!")
sys.exit(1)
develop:
image: ${{ images.img.ref }}
# note, since the base image v1.6 redirects the output via '2>&1 | tee'
# the image cannot run bash in interactive mode.
cmd: bash
env:
EXPOSE_SSH: "yes"
PYTHONPATH: ${{ volumes.code.mount }}
port_forward:
- "2211:22"
train:
image: ${{ images.img.ref }}
detach: True
life_span: 10d
volumes:
- ${{ volumes.data.ref_ro }}
- ${{ upload(volumes.code).ref_rw }}
- ${{ volumes.config.ref_ro }}
- ${{ volumes.results.ref_rw }}
env:
EXPOSE_SSH: "yes"
PYTHONPATH: ${{ volumes.code.mount }}
bash: |
cd ${{ volumes.project.mount }}
python ${{ volumes.code.mount }}/train.py --data ${{ volumes.data.mount }}
multitrain:
image: ${{ images.img.ref }}
detach: True
life_span: 10d
volumes:
- ${{ volumes.data.ref_ro }}
- ${{ upload(volumes.code).ref_rw }}
- ${{ volumes.config.ref_ro }}
- ${{ volumes.results.ref_rw }}
env:
EXPOSE_SSH: "yes"
PYTHONPATH: ${{ volumes.code.mount }}
multi: true
bash: |
cd ${{ volumes.project.mount }}
python ${{ volumes.code.mount }}/train.py --data ${{ volumes.data.mount }} ${{ multi.args }}
jupyter:
action: ws:.neuro/jupyter
args:
volume_data: $[[ volumes.data.ref_ro ]]
volume_code: ${{ upload(volumes.code).ref_rw }}
volume_config: ${{ volumes.config.ref_ro }}
volume_notebooks: ${{ volumes.notebooks.ref_rw }}
volume_results: ${{ volumes.results.ref_rw }}
python_path: ${{ volumes.code.mount }}
image: ${{ images.img.ref }}
notebook_dir: ${{ volumes.notebooks.mount }}
tensorboard:
preset: cpu-small
http_port: 6006
browse: True
detach: True
volumes:
- ${{ volumes.results.ref_ro }}
image: tensorflow/tensorflow:latest
cmd: tensorboard --host=0.0.0.0 --logdir=${{ volumes.results.mount }}
filebrowser:
preset: cpu-small
http_port: 80
browse: True
detach: True
volumes:
- ${{ volumes.project.remote }}:/srv:rw
image: filebrowser/filebrowser:latest
cmd: --noauth