While I like Google Colab, I have found it to be pretty limiting for data science projects.
Instead, I’ll be demonstrating how to create an EC2 instance to run The Littlest Jupyter Hub
Navigate to EC2 and select “Instances” -> “Create Instance”
The documentation for TLJH suggests that you select an Instance Type with at least 2GB of RAM like t3.small, but for my purposes, I am going to use T3.medium, since I could use just a little extra RAM.
Next, we go to Network settings to add two new rules, one for HTTP traffic and one for HTTPS traffic. Select “Edit” in the top right of the Network settings box to be shown this:
Now, generate a key pair
I’ll be using Putty so I selected .ppk
Select “add security group rule” at the bottom
You will need to add two: one for HTTP and HTTPS. Add 0.0.0.0/0 and ::/0 to the source fields for both.
Configure Storage as you need, I left it as default for now.
Finally, expand the drop-down menu “Advanced Details” You should see a series of options like so:
At the bottom of this menu, there will be a field called “user data”
#!/bin/bash
curl -L https://tljh.jupyter.org/bootstrap.py \
| sudo python3 - \
--admin [name of your choosing]
You will need to enter this bit of bash code to that field. You can now launch instance
It may take a few minutes in order to load, but you should see it running.
Once the instance has been started, you can use the public IPv4 address to access it. I had to use Google Chrome
Finally, you should be able to use the admin username and password you set in user-data here. If you didn’t set a password like me, then enter a password that you would like to use going forward.
You will be brought to your Jupyter Hub notebook! Congratulations.
If you use your public IP address and add /admin to the end, you can see admin-role specific settings.
You can create new users here and see what the server would look like from their perspective.