Victarry commited on
Commit
a9efce6
·
1 Parent(s): f46377e

Add dockerfile and update packages.

Browse files
Files changed (3) hide show
  1. Dockerfile +19 -0
  2. pyproject.toml +1 -0
  3. requirements.txt +2 -2
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ FROM python:3.9-slim
3
+
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+ ENV HOME="/home/user"
8
+ WORKDIR /home/user/app
9
+
10
+ COPY --chown=user requirements.txt ./
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
+
13
+ COPY --chown=user . ./
14
+
15
+ # Expose the port app will run on
16
+ EXPOSE 7860
17
+
18
+ # Start the app
19
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:server"]
pyproject.toml CHANGED
@@ -25,6 +25,7 @@ dependencies = [
25
  "numpy>=1.26.0",
26
  "tqdm>=4.67.0",
27
  "dash-bootstrap-components>=1.7.1",
 
28
  ]
29
 
30
  [project.optional-dependencies]
 
25
  "numpy>=1.26.0",
26
  "tqdm>=4.67.0",
27
  "dash-bootstrap-components>=1.7.1",
28
+ "gunicorn>=23.0.0",
29
  ]
30
 
31
  [project.optional-dependencies]
requirements.txt CHANGED
@@ -1,9 +1,9 @@
1
  dash==2.14.2
 
2
  plotly==5.18.0
3
- gunicorn==21.2.0
4
  hydra-core==1.3.2
5
  omegaconf==2.3.0
6
  pandas==2.1.0
7
  numpy==1.26.0
8
  tqdm==4.67.0
9
- dash-bootstrap-components==1.7.1
 
1
  dash==2.14.2
2
+ dash-bootstrap-components==1.7.1
3
  plotly==5.18.0
4
+ gunicorn==21.2.0
5
  hydra-core==1.3.2
6
  omegaconf==2.3.0
7
  pandas==2.1.0
8
  numpy==1.26.0
9
  tqdm==4.67.0