go2sujeet commited on
Commit
6c2f343
·
1 Parent(s): 24f910c

Update Dockerfile and main.py for server configuration

Browse files
Files changed (3) hide show
  1. Makefile +1 -1
  2. dockerfile +3 -0
  3. src/main.py +1 -1
Makefile CHANGED
@@ -5,4 +5,4 @@ run_local:
5
  build_docker_image:
6
  docker build -t my-gradio-parking . --no-cache
7
  run_docker_image:
8
- docker run -p 8080:8080 my-gradio-parking
 
5
  build_docker_image:
6
  docker build -t my-gradio-parking . --no-cache
7
  run_docker_image:
8
+ docker run -p 8080:8080 my-gradio-parking
dockerfile CHANGED
@@ -13,5 +13,8 @@ RUN pip install --no-cache-dir -r requirements.txt
13
  COPY src/ src/
14
  COPY data/ data/
15
 
 
 
 
16
  # Set the entry point command
17
  CMD ["python", "src/main.py"]
 
13
  COPY src/ src/
14
  COPY data/ data/
15
 
16
+ #Expose the port
17
+ EXPOSE 8080
18
+
19
  # Set the entry point command
20
  CMD ["python", "src/main.py"]
src/main.py CHANGED
@@ -39,4 +39,4 @@ with gr.Blocks() as app:
39
 
40
 
41
  if __name__ == "__main__":
42
- app.launch(server_port=8080, debug=True,inbrowser = True)
 
39
 
40
 
41
  if __name__ == "__main__":
42
+ app.launch(server_port=8080, debug=True, server_name="0.0.0.0")