caviri commited on
Commit
54bf84e
·
1 Parent(s): d7af185

ci: Testing HF

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -2
  2. app/main.py +1 -16
Dockerfile CHANGED
@@ -37,11 +37,15 @@ RUN apt-get update && apt-get -y upgrade \
37
  # ODTP setup
38
  ##################################################
39
 
 
 
 
40
  RUN mkdir /app
41
- COPY . /digiwild
42
 
43
  RUN pip3 install -r /digiwild/requirements.txt
44
 
45
- RUN chmod -R 777 /digiwild/data /digiwild/app/assets
 
46
  WORKDIR /digiwild
47
  ENTRYPOINT python3 app/main.py
 
37
  # ODTP setup
38
  ##################################################
39
 
40
+ RUN useradd -m -u 1000 user
41
+ USER user
42
+
43
  RUN mkdir /app
44
+ COPY --chown=user:user . /digiwild
45
 
46
  RUN pip3 install -r /digiwild/requirements.txt
47
 
48
+ RUN chown -R user:user /digiwild/data /digiwild/app/assets
49
+
50
  WORKDIR /digiwild
51
  ENTRYPOINT python3 app/main.py
app/main.py CHANGED
@@ -331,21 +331,6 @@ with gr.Blocks(theme='shivi/calm_seafoam') as demo:
331
  show_modal.click(create_tmp)
332
  #submit_button.click(save_and_rest_df, inputs=[df], outputs=[df])
333
 
334
-
335
- # Simple landing page with Gradio
336
- with gr.Blocks(theme='shivi/calm_seafoam') as demo2:
337
- with gr.Row():
338
- with gr.Column(scale=1):
339
- title = gr.Markdown("# Welcome to the Simple Landing Page", label="Title")
340
- description = gr.Markdown("This is a simple landing page created with Gradio.", label="description")
341
- with gr.Row():
342
- button = gr.Button("Click Me", scale=1)
343
- output = gr.Textbox(label="Output", interactive=False)
344
-
345
- def on_button_click():
346
- return "Button Clicked!"
347
-
348
- button.click(on_button_click, outputs=output)
349
 
350
  if __name__ == "__main__":
351
- demo2.launch(server_name="0.0.0.0", server_port=3333)
 
331
  show_modal.click(create_tmp)
332
  #submit_button.click(save_and_rest_df, inputs=[df], outputs=[df])
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
 
335
  if __name__ == "__main__":
336
+ demo.launch(server_name="0.0.0.0", server_port=3333)