lilferrit commited on
Commit
4956cb1
1 Parent(s): 28860bf

implemented dockerfile

Browse files
Files changed (3) hide show
  1. Dockerfile +15 -0
  2. eggcount/app.py +13 -1
  3. requirements.txt +73 -0
Dockerfile ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.10
5
+
6
+ WORKDIR /code
7
+
8
+ COPY ./requirements.txt /code/requirements.txt
9
+ COPY ./setup.py /code/setup.py
10
+ COPY ./eggcount /code/eggcount
11
+
12
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
+ RUN pip install -e /code
14
+
15
+ CMD ["python3", "-m", "--host=\"0.0.0.0\"", "--port=\"7860\""]
eggcount/app.py CHANGED
@@ -1,5 +1,6 @@
1
  import dash_bootstrap_components as dbc
2
  import dash
 
3
 
4
  from eggcount.ui.ui_utils import (
5
  get_navbar
@@ -21,5 +22,16 @@ app.layout = dbc.Container(
21
  id = "content-container"
22
  )
23
 
 
 
 
 
 
 
 
 
 
 
 
24
  if __name__ == '__main__':
25
- app.run(debug = True)
 
1
  import dash_bootstrap_components as dbc
2
  import dash
3
+ import fire
4
 
5
  from eggcount.ui.ui_utils import (
6
  get_navbar
 
22
  id = "content-container"
23
  )
24
 
25
+ def main(
26
+ debug: bool = False,
27
+ port: str = "8080",
28
+ host: str = "127.0.0.1"
29
+ ) -> None:
30
+ app.run(
31
+ debug = debug,
32
+ host = host,
33
+ port = port
34
+ )
35
+
36
  if __name__ == '__main__':
37
+ fire.Fire(main)
requirements.txt ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ansi2html==1.9.1
2
+ attrs==23.2.0
3
+ blinker==1.7.0
4
+ certifi==2023.11.17
5
+ cfgv==3.4.0
6
+ charset-normalizer==3.3.2
7
+ click==8.1.7
8
+ contourpy==1.2.0
9
+ cycler==0.12.1
10
+ dash==2.14.2
11
+ dash-bootstrap-components==1.5.0
12
+ dash-core-components==2.0.0
13
+ dash-html-components==2.0.0
14
+ dash-iconify==0.1.2
15
+ dash-mantine-components==0.12.0
16
+ dash-table==5.0.0
17
+ dash-tools==1.12.0
18
+ distlib==0.3.8
19
+ docopt==0.6.2
20
+ filelock==3.13.1
21
+ fire==0.5.0
22
+ Flask==3.0.1
23
+ fonttools==4.47.2
24
+ gunicorn==21.2.0
25
+ identify==2.5.33
26
+ idna==3.6
27
+ importlib-metadata==7.0.1
28
+ iniconfig==2.0.0
29
+ itsdangerous==2.1.2
30
+ Jinja2==3.1.3
31
+ kiwisolver==1.4.5
32
+ MarkupSafe==2.1.4
33
+ matplotlib==3.8.2
34
+ nest-asyncio==1.6.0
35
+ nodeenv==1.8.0
36
+ numpy==1.26.3
37
+ opencv-python-headless==4.9.0.80
38
+ packaging==21.3
39
+ pandas==2.2.0
40
+ pillow==10.2.0
41
+ pillow-heif==0.14.0
42
+ pipreqs==0.4.12
43
+ platformdirs==4.2.0
44
+ plotly==5.18.0
45
+ pluggy==1.4.0
46
+ pre-commit==2.16.0
47
+ py==1.11.0
48
+ pyparsing==3.1.1
49
+ PyQt5==5.15.10
50
+ PyQt5-Qt5==5.15.2
51
+ PyQt5-sip==12.13.0
52
+ pytest==6.2.5
53
+ python-dateutil==2.8.2
54
+ pytz==2023.3.post1
55
+ PyYAML==6.0.1
56
+ requests==2.31.0
57
+ retrying==1.3.4
58
+ ruamel.yaml==0.17.21
59
+ ruamel.yaml.clib==0.2.8
60
+ shiboken2==5.15.2.1
61
+ six==1.16.0
62
+ tenacity==8.2.3
63
+ termcolor==1.1.0
64
+ toml==0.10.2
65
+ typing_extensions==4.9.0
66
+ tzdata==2023.4
67
+ urllib3==2.1.0
68
+ virtualenv==20.25.0
69
+ visdcc==0.0.50
70
+ Werkzeug==3.0.1
71
+ yarg==0.1.9
72
+ yolk3k==0.9
73
+ zipp==3.17.0