Surya T commited on
Commit
ddde671
·
1 Parent(s): 685229c

fix gradio app

Browse files
Files changed (4) hide show
  1. .gitignore +1 -0
  2. Dockerfile +12 -2
  3. app.py +2 -0
  4. requirements.txt +2 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv
Dockerfile CHANGED
@@ -1,9 +1,19 @@
1
  FROM python:3.10-slim
2
 
3
- WORKDIR /usr/src/app
 
 
 
4
  COPY . .
5
- RUN pip install --no-cache-dir gradio pillow
 
 
 
 
 
 
6
  EXPOSE 7860
 
7
  ENV GRADIO_SERVER_NAME="0.0.0.0"
8
 
9
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ RUN useradd -m -u 1000 user
4
+
5
+ WORKDIR /app
6
+
7
  COPY . .
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
+
13
+ COPY --chown=user . /app
14
+
15
  EXPOSE 7860
16
+
17
  ENV GRADIO_SERVER_NAME="0.0.0.0"
18
 
19
  CMD ["python", "app.py"]
app.py CHANGED
@@ -74,3 +74,5 @@ with gr.Blocks() as demo:
74
  inputs=[generator_json_file, generator_custom_nodes],
75
  outputs=generator_output_url
76
  )
 
 
 
74
  inputs=[generator_json_file, generator_custom_nodes],
75
  outputs=generator_output_url
76
  )
77
+
78
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio
2
+ pillow