camilleseab commited on
Commit
cdbe199
1 Parent(s): 58a2379

Debug first build pt3

Browse files
Files changed (4) hide show
  1. Dockerfile +2 -1
  2. environment.yml +4 -3
  3. notebooks/app.ipynb +113 -6
  4. voila.json +1 -6
Dockerfile CHANGED
@@ -17,4 +17,5 @@ RUN mamba env create --prefix $HOME/env -f ./environment.yml
17
  EXPOSE 7860
18
  WORKDIR $HOME/app
19
 
20
- CMD mamba run -p $HOME/env --no-capture-output voila --no-browser notebooks/
 
 
17
  EXPOSE 7860
18
  WORKDIR $HOME/app
19
 
20
+ CMD mamba run -p $HOME/env --no-capture-output voila --no-browser --port=7860 notebooks/app.ipynb
21
+ # CMD python3 -m voila --no-browser notebooks/ --port=7860
environment.yml CHANGED
@@ -3,14 +3,15 @@ channels:
3
  - conda-forge
4
  dependencies:
5
  - python
6
- - ipywidgets
7
  - ipykernel
8
  - pip
9
  - ultralytics
10
  - pillow
11
  - python-dotenv
12
  - opencv
 
 
 
13
 
14
  - pip:
15
- - voila==0.5.0
16
- - voila-topbar==0.1.1
 
3
  - conda-forge
4
  dependencies:
5
  - python
 
6
  - ipykernel
7
  - pip
8
  - ultralytics
9
  - pillow
10
  - python-dotenv
11
  - opencv
12
+ - jupyterlab_widgets
13
+ - voila
14
+ - ipywidgets
15
 
16
  - pip:
17
+ - voila-topbar
 
notebooks/app.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": null,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
@@ -11,7 +11,7 @@
11
  },
12
  {
13
  "cell_type": "code",
14
- "execution_count": null,
15
  "metadata": {},
16
  "outputs": [],
17
  "source": [
@@ -25,9 +25,108 @@
25
  },
26
  {
27
  "cell_type": "code",
28
- "execution_count": null,
29
  "metadata": {},
30
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  "source": [
32
  "output = widgets.Output()\n",
33
  "lbl_style = {'description_width': '200px'}\n",
@@ -67,9 +166,9 @@
67
  "\n",
68
  "\n",
69
  "def button_click(b):\n",
 
70
  " with output:\n",
71
- " output.clear_output()\n",
72
- " txt = f'test: location = {location.value}'\n",
73
  " print(txt)\n",
74
  " return txt\n",
75
  "\n",
@@ -105,7 +204,15 @@
105
  "name": "python3"
106
  },
107
  "language_info": {
 
 
 
 
 
 
108
  "name": "python",
 
 
109
  "version": "3.11.5"
110
  }
111
  },
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
 
11
  },
12
  {
13
  "cell_type": "code",
14
+ "execution_count": 2,
15
  "metadata": {},
16
  "outputs": [],
17
  "source": [
 
25
  },
26
  {
27
  "cell_type": "code",
28
+ "execution_count": 3,
29
  "metadata": {},
30
+ "outputs": [
31
+ {
32
+ "data": {
33
+ "application/vnd.jupyter.widget-view+json": {
34
+ "model_id": "57fe1b257f5448208a6e6c07ada26ef8",
35
+ "version_major": 2,
36
+ "version_minor": 0
37
+ },
38
+ "text/plain": [
39
+ "Text(value='33rd & Loch Raven Baltimore MD', description='Location', layout=Layout(width='600px'), style=TextS…"
40
+ ]
41
+ },
42
+ "metadata": {},
43
+ "output_type": "display_data"
44
+ },
45
+ {
46
+ "data": {
47
+ "application/vnd.jupyter.widget-view+json": {
48
+ "model_id": "6a4f58d9f343425993aa59f5e3271118",
49
+ "version_major": 2,
50
+ "version_minor": 0
51
+ },
52
+ "text/plain": [
53
+ "IntSlider(value=640, description='Image size', layout=Layout(width='600px'), max=1024, min=100, style=SliderSt…"
54
+ ]
55
+ },
56
+ "metadata": {},
57
+ "output_type": "display_data"
58
+ },
59
+ {
60
+ "data": {
61
+ "application/vnd.jupyter.widget-view+json": {
62
+ "model_id": "36da56e191be4d7fb5c26a3e90145d4b",
63
+ "version_major": 2,
64
+ "version_minor": 0
65
+ },
66
+ "text/plain": [
67
+ "IntSlider(value=140, description='Heading (rotation)', layout=Layout(width='600px'), max=360, style=SliderStyl…"
68
+ ]
69
+ },
70
+ "metadata": {},
71
+ "output_type": "display_data"
72
+ },
73
+ {
74
+ "data": {
75
+ "application/vnd.jupyter.widget-view+json": {
76
+ "model_id": "cb10a0a70dc04d2690dc41d7eec0bb1f",
77
+ "version_major": 2,
78
+ "version_minor": 0
79
+ },
80
+ "text/plain": [
81
+ "IntSlider(value=10, description='Pitch (tilt)', layout=Layout(width='600px'), max=40, style=SliderStyle(descri…"
82
+ ]
83
+ },
84
+ "metadata": {},
85
+ "output_type": "display_data"
86
+ },
87
+ {
88
+ "data": {
89
+ "application/vnd.jupyter.widget-view+json": {
90
+ "model_id": "2425ac1c49504ec199bdee5abee9d2e3",
91
+ "version_major": 2,
92
+ "version_minor": 0
93
+ },
94
+ "text/plain": [
95
+ "IntSlider(value=50, description='Field of view (zoom)', layout=Layout(width='600px'), max=120, min=10, style=S…"
96
+ ]
97
+ },
98
+ "metadata": {},
99
+ "output_type": "display_data"
100
+ },
101
+ {
102
+ "data": {
103
+ "application/vnd.jupyter.widget-view+json": {
104
+ "model_id": "da832f9cbde14700a60901e887b1789c",
105
+ "version_major": 2,
106
+ "version_minor": 0
107
+ },
108
+ "text/plain": [
109
+ "Button(description='Get image', style=ButtonStyle())"
110
+ ]
111
+ },
112
+ "metadata": {},
113
+ "output_type": "display_data"
114
+ },
115
+ {
116
+ "data": {
117
+ "application/vnd.jupyter.widget-view+json": {
118
+ "model_id": "3d8bec926ef0413db6d9865418dc2045",
119
+ "version_major": 2,
120
+ "version_minor": 0
121
+ },
122
+ "text/plain": [
123
+ "Output()"
124
+ ]
125
+ },
126
+ "metadata": {},
127
+ "output_type": "display_data"
128
+ }
129
+ ],
130
  "source": [
131
  "output = widgets.Output()\n",
132
  "lbl_style = {'description_width': '200px'}\n",
 
166
  "\n",
167
  "\n",
168
  "def button_click(b):\n",
169
+ " output.clear_output()\n",
170
  " with output:\n",
171
+ " txt = f'location: {location.value}'\n",
 
172
  " print(txt)\n",
173
  " return txt\n",
174
  "\n",
 
204
  "name": "python3"
205
  },
206
  "language_info": {
207
+ "codemirror_mode": {
208
+ "name": "ipython",
209
+ "version": 3
210
+ },
211
+ "file_extension": ".py",
212
+ "mimetype": "text/x-python",
213
  "name": "python",
214
+ "nbconvert_exporter": "python",
215
+ "pygments_lexer": "ipython3",
216
  "version": "3.11.5"
217
  }
218
  },
voila.json CHANGED
@@ -1,11 +1,6 @@
1
  {
2
  "Voila": {
3
  "ip":"0.0.0.0",
4
- "port": 7860,
5
- "tornado_settings": {
6
- "headers": {
7
- "Content-Security-Policy": "frame-ancestors self *"
8
- }
9
- }
10
  }
11
  }
 
1
  {
2
  "Voila": {
3
  "ip":"0.0.0.0",
4
+ "port": 7860
 
 
 
 
 
5
  }
6
  }