li-nguyen commited on
Commit
b07f575
1 Parent(s): 27a0393

Add docker specific changes

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. app.py +5 -2
Dockerfile CHANGED
@@ -1,7 +1,7 @@
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.9
5
 
6
  RUN useradd -m -u 1000 user
7
 
@@ -15,4 +15,4 @@ COPY --chown=user . /app
15
 
16
  EXPOSE 7860
17
 
18
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:server"]
 
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.12
5
 
6
  RUN useradd -m -u 1000 user
7
 
 
15
 
16
  EXPOSE 7860
17
 
18
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:server"]
app.py CHANGED
@@ -107,5 +107,8 @@ dashboard = vm.Dashboard(
107
  ),
108
  )
109
 
110
- if __name__ == "__main__":
111
- Vizro().build(dashboard).run()
 
 
 
 
107
  ),
108
  )
109
 
110
+ app = Vizro().build(dashboard)
111
+ server = app.dash.server
112
+
113
+ if __name__ == "__main__":
114
+ app.run()