Open KatJHuang opened 5 years ago
ToDo:
We can establish connection with server on EC2 now. Steps to produce:
Obtain elastic IP and associate with an EC2 instance (in my case, a t5.xlarge ML AMI) Below is an example of elastic IP:
Configure security group settings: open up ports you want to use
ssh
into the instance and obtain the local IP address with ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'
Start the instance, clone the experiment code in pythonServer.py, and start the server by running python pythonServer.py <local ip addr from above>
Open the Android app and set 1) server IP address to elastic IP from above and 2) port to be a number within the range defined in the AWS EC2 instance Security Group. Run the app, record something, and hit upload. Interactions take place on both sides as expected: Android: Python Server running on EC2:
So this is some temporary success. In the next step I'll get the models up in EC2 and instead of passing strings around I'll make the server serve predictions given binary wav files.
ToDo:
Feb 13 Proceedings
Elastic IP for EC2 instance remains the same: 18.224.75.47
To ensure universal access to our server, we should host it on the cloud. The AWS EC2 provides a good solution.
Acceptance Criteria: GIVEN a properly configured AWS EC2 server WHEN I issue a prediction request THEN the server should return a string representing the prediction result
Resources EC2 server: https://stackoverflow.com/a/37175079 Python server using HTTP requests: https://stackoverflow.com/questions/33662842/simple-python-server-to-process-get-and-post-requests-with-json