AWS AMI available for testing

I just got my EC2 instance limit increased and was successful in opening a Jupiter notebook on the AMI !! Thanks @wluo for the detailed steps.

Thanks for the detailed guideline

The AMI is ami-8c4288f4

p2 is probably what you want.

1 Like

Thanks Jeremy

Would you be able to create one in Australia? There are not many of us in the class but our closest server is in Sydney…

This is the ID of the Sydney AMI: ami-39ec055b - taken from the Wiki: Lesson 2 thread.

Newbies,
Here are detailed notes on how to set up and use the GPU AMI that @jeremy created. The notes correlate to the last 10 minutes of Lesson 2 of 06-Nov-2017.

AWS fastami GPU Image Setup

7 Likes

Thanks @reshama! Could you add a link to that to the top of the lesson’s wiki post? It’s really great and I’d like everyone to be able to see it :slight_smile:

1 Like

@jeremy done :+1: (GPU AMI link added to Lesson 2 wiki)

1 Like

Not sure if this is a good palce to post this… I keep getting dropped from my ssh connection to my instance of the AMI, with “Connection reset by (whatever the current IP address is) port 22”. Is there any solution to this?

I am not sure if this is directly related to your question. But I use a program called tmux that you can run in the ami…Just type tmux. It will give you a new terminal there and that’s always on even if your ssh connection is lost. So I run Jupyter notebook inside the tmux session and you can re-connect to the notebook and continue from there. I am not sure if it’s directly related, just sharing my process. When I reconnect, I just run tmux a (Attach to the running session that I was dropped from). Here’s more hints, if you choose to use tmux - https://robots.thoughtbot.com/a-tmux-crash-course

If this doesn’t help your question, just reply back and I am sure someone else might have other suggestions.

2 Likes

Well, this time I tried reconnecting, in order to follow your advice and run tmux, it connects, but but now I am getting these error messages continuously:

channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused

This is not the first time I have experienced getting my connection dropped, but the Open failed message is new…

I am going to reset the server and try again.

This might be because you are tunneling port 8888, but there’s no application running at that port in your remote AWS server. You may need to start Jupyter Notebook there. try jupyter notebook list and see if you see any currently running servers.

One other option might be is to stop your computer from going to sleep. May be that also drops the networks connections when you don’t use your computer for few minutes. Check your energy saver settings.

1 Like

THanks for replying Ramesh.

My “Sleep” setting is never. I couldn’t see anything obvious in advanced settings.

Regarding whether I have Jupyter Notebook running - I already did have it running, it was in the middle of a session of editing that it happened. However I was inactive for some minutes so even though I have no Sleep setting, maybe something I don’t easily see in the settings made this happen. I note that I had a message in the terminal about notebook1 not being trusted, which was the last message before the disconnect…

Ok…If you are still getting disconnected, it might be worthwhile to open up port 8888 on your AWS Server and directly connect to it via the Browser.

Configure Jupyter to accept connections from everywhere - $jupyter notebook --generate-config

  • To create a password run $jupyter notebook password

Then update the config via -

$echo "c.NotebookApp.ip = '*'" >> $HOME/.jupyter/jupyter_notebook_config.py
$echo "c.NotebookApp.open_browser = False" >> $HOME/.jupyter/jupyter_notebook_config.py

Then if the port 8888 is open and you run jupyter notebook in your tmux session, you can access it from browser via the http://:8888 and you are no longer bound to your ssh connection. You can even remove the tunneling from your ssh connection.

1 Like

Thanks. I will give this a try. Should I have a static IP address on the server for this to work?

Regarding tmux. I actually read this crash course and tried tmux out, but I really don’t understand how to manage it. All that happened is that my terminal window was now a tmux window, but I couldn’t figure out how to make another window. Is there a magic key combination to activate “command mode” like in the vi editor?

Yes, there is! By default it is ctrl+b follow by c. ctrl+b followed by number will take you to a specified pane. ctrl+b followed by x kills a pane.

1 Like

If you press ‘ctrl+b’ followed by ‘?’ then it will display you help pane with all key shortcuts. You can exit it by pressing ‘q’ key

2 Likes

Speaking of Tmux on the official AWS AMI, does anybody know how to copy/paste text between Tmux and the local Ubuntu clipboard?