I am trying to deploy a simple hello world application (on AWS EC2 on Ubuntu 22). I have done the following till now.
1)Created and activated the virtual environment.
2)Installed required software libraries.
3)Started the app using the command - streamlit run myFirstStreamlitApp.py --server.headless=true --logger.level=warning 2
I used --server.headless=true because the app is running on an EC2 which has no chrome browser.
The application starts with the following message
2024-01-10 10:54:05.512 Did not auto detect external IP.
Please go to https://docs.streamlit.io/ for debugging hints.
You can now view your Streamlit app in your browser.
Network URL: http://10.211.58.17:8501
5)When I curl the url using curl -v http://10.211.58.17:8501 I see the following response. This is not the correct response. How do I get the correct response? Please help! Thanks.
$ sudo su
root@ip-10-211-58-17:/var/snap/amazon-ssm-agent/7780# curl -v http://10.211.58.17:8501
- Trying 10.211.58.17:8501…
- Connected to 10.211.58.17 (10.211.58.17) port 8501 (#0)
GET / HTTP/1.1
Host: 10.211.58.17:8501
User-Agent: curl/7.81.0
Accept: /
- Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: TornadoServer/6.4
< Content-Type: text/html
< Date: Wed, 10 Jan 2024 17:54:34 GMT
< Accept-Ranges: bytes
< Etag: “640a88aa3cab5e0011cb98f23c15b1cf6991154798f312c77a0bb927a04dc0cd326539aaefcc5a8c69c48526d70192d026781db0b9f9b5bf0e1cda3506edea22”
< Last-Modified: Tue, 09 Jan 2024 17:58:20 GMT
< Cache-Control: no-cache
< Content-Length: 892
< Vary: Accept-Encoding
< - Connection #0 to host 10.211.58.17 left intact
<!doctype html>StreamlitYou need to enable JavaScript to run this app.root@ip-10-211-58-17:/var/snap/amazon-ssm-agent/7780#