-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.yml
116 lines (116 loc) · 3.68 KB
/
app.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
---
ocean:
version: "1"
images:
- name: ray
registry: docker_hub
image: getocean/ray-notebook
tag: latest
steps:
- engines:
- name: ray_jupyter
vars:
- name: ray_head_host
value: "{{ engines.ray_jupyter.deployment.nodes.main.private_ip }}"
- name: jupyter_token
value: "{% generate_uuid %}"
settings:
- name: mode
label: Jupyter Mode
type: dropdown
default_value: 'lab'
options:
- value: lab
label: 'Lab'
- value: notebook
label: 'Notebook'
networking:
dns:
enabled: true
default_value: ray
label: Ray/Jupyter URL
ports:
- name: ray_head
public: false
- name: ray_dashboard
public: true
- name: ray_node_manager
public: false
- name: ray_object_manager
public: false
- name: gcs_server
public: false
- name: jupyter
public: true
deployment:
strategy: main
container:
image:
name: ray
editable: true
user: root
workdir: "/home/{{ workspace.user.name }}"
mounts:
app_files:
- name: ray_jupyter
app_files_path: ray_jupyter
container_path: /ocean/etc/ray_jupyter
readonly: true
data_stores: "{{ engines.ray_jupyter.container.workdir }}"
command: "{{ engines.ray_jupyter.container.mounts.app_files.ray_jupyter.container_path }}/startup.sh"
env_vars:
- name: JUPYTER_ENABLE_LAB
value: "{% if engines.jupyter.settings.mode.value == 'lab' %}yes{% else %}no{% endif %}"
- name: NB_UID
value: "{{ workspace.user.uid }}"
- name: NB_GID
value: "{{ workspace.user.gid }}"
- name: NB_USER
value: "{{ workspace.user.name }}"
- name: NB_GROUP
value: "{{ workspace.user.group }}"
- name: CHOWN_HOME
value: "yes"
- name: GRANT_SUDO
value: "yes"
- name: RESTARTABLE
value: "yes"
- name: RAY_ADDRESS
value: "{{ engines.ray_jupyter.vars.ray_head_host }}:{{ engines.ray_jupyter.networking.ports.ray_head.value }}"
ui:
buttons:
- label: Ray Dashboard
url: "http://{{ engines.ray_jupyter.networking.dns.url }}:{{ engines.ray_jupyter.networking.ports.ray_dashboard.value }}"
- label: Jupyter Notebook
url: "http://{{ engines.ray_jupyter.networking.dns.url }}:{{ engines.ray_jupyter.networking.ports.jupyter.value }}?token={{ engines.ray_jupyter.vars.jupyter_token }}"
- engines:
- name: ray_worker
networking:
ports:
- name: ray_node_manager
public: false
- name: ray_object_manager
public: false
deployment:
strategy: workers_fill_pool_if_available
container:
image:
name: ray
editable: true
user: root
workdir: /work
mounts:
app_files:
- name: ray_worker
app_files_path: ray_worker
container_path: /ocean/etc/ray_worker
readonly: true
data_stores: "{{ engines.ray_worker.container.workdir }}"
command: "{{ engines.ray_worker.container.mounts.app_files.ray_worker.container_path }}/startup.sh"
env_vars:
- name: NB_UID
value: "{{ workspace.user.uid }}"
- name: NB_GID
value: "{{ workspace.user.gid }}"
- name: CHOWN_HOME
value: 'yes'