VenkateshRoshan commited on
Commit
b6ea18a
·
1 Parent(s): 44ac321

Updated dockerfile and notes

Browse files
Files changed (2) hide show
  1. dockerfile +2 -2
  2. notes.txt +29 -4
dockerfile CHANGED
@@ -21,9 +21,9 @@ RUN pip install --no-cache-dir -r requirements.txt
21
  # Make port 7860 available to the world outside this container
22
  EXPOSE 7860
23
  # Prometheus Node Exporter metrics
24
- EXPOSE 25561
25
  # Prometheus Python app metrics
26
- EXPOSE 25562
27
 
28
 
29
  # Run app.py when the container launches
 
21
  # Make port 7860 available to the world outside this container
22
  EXPOSE 7860
23
  # Prometheus Node Exporter metrics
24
+ EXPOSE 9100
25
  # Prometheus Python app metrics
26
+ EXPOSE 8000
27
 
28
 
29
  # Run app.py when the container launches
notes.txt CHANGED
@@ -35,15 +35,15 @@ RUN apt-get install -y prometheus-node-exporter
35
 
36
  # exposing ports
37
  # Prometheus Node Exporter metrics
38
- EXPOSE 25561
39
  # Prometheus Python app metrics
40
- EXPOSE 25562
41
 
42
  # Run both the Node Exporter and the Gradio application
43
  CMD ["sh", "-c", "prometheus-node-exporter & python app.py"]
44
 
45
  # run docker
46
- docker run -d -p 25560:7860 -p 25561:9100 -p 25562:8000 venkateshroshan/mlops-cs3:latest3
47
 
48
  # access the application in localhost via ssh tunneling
49
  ssh -L 25560:localhost:25560 -L 25561:localhost:25561 -L 25562:localhost:25562 -p 2222 [email protected]
@@ -64,6 +64,9 @@ ngrok http 25561
64
 
65
  ngrok http 25562
66
 
 
 
 
67
 
68
  # Grafana visualization
69
  docker pull grafana/grafana:latest
@@ -90,4 +93,26 @@ ssh -L 25560:localhost:25560 -L 25561:localhost:25561 -L 25562:localhost:25562 -
90
  http://localhost:25564/targets?search=
91
 
92
  go to grafana http://localhost:25563
93
- create a dashboard and add prometheus with the link as 192.168.0.230:25564
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  # exposing ports
37
  # Prometheus Node Exporter metrics
38
+ EXPOSE 9100
39
  # Prometheus Python app metrics
40
+ EXPOSE 8000
41
 
42
  # Run both the Node Exporter and the Gradio application
43
  CMD ["sh", "-c", "prometheus-node-exporter & python app.py"]
44
 
45
  # run docker
46
+ docker run -d -p 25560:7860 -p 25561:9100 -p 25562:8000 venkateshroshan/mlops-cs3:latest4
47
 
48
  # access the application in localhost via ssh tunneling
49
  ssh -L 25560:localhost:25560 -L 25561:localhost:25561 -L 25562:localhost:25562 -p 2222 [email protected]
 
64
 
65
  ngrok http 25562
66
 
67
+ # to run forever - use nohup
68
+ nohup ngrok http --log=log.txt http://localhost:25560 > /dev/null &
69
+
70
 
71
  # Grafana visualization
72
  docker pull grafana/grafana:latest
 
93
  http://localhost:25564/targets?search=
94
 
95
  go to grafana http://localhost:25563
96
+ create a dashboard and add prometheus with the link as http://192.168.0.230:25564
97
+
98
+ # Final RUN
99
+ docker pull venkateshroshan/mlops-cs3:latest4
100
+
101
+ docker run -d -p 25560:7860 -p 25561:9100 -p 25562:8000 --name group13_app venkateshroshan/mlops-cs3:latest4
102
+
103
+ docker pull docker pull grafana/grafana:latest
104
+
105
+ docker run -d -p 25563:3000 --name group13_grafana grafana/grafana:latest
106
+
107
+ docker pull prom/prometheus
108
+
109
+ docker run -d -p 25564:9090 -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml --name group13_prometheus prom/prometheus
110
+
111
+ ssh -L 25560:localhost:25560 -L 25561:localhost:25561 -L 25562:localhost:25562 -L 25563:localhost:25563 -L 25564:localhost:25564 -p 2222 [email protected]
112
+
113
+ # visualize these 4 metrics
114
+ transcription_requests_total - Total transcription requests
115
+ transcription_request_duration_seconds - Duration of transcription requests in seconds
116
+ transcription_memory_usage_bytes - Memory used by the transcription function
117
+ ram_usage_percentage - Percentage of total RAM used by the transcription function
118
+