The iPad is a functional and sufficient workstation in 2021. The following applications can create a slick, modern, deep learning workflow, allowing you to work from anywhere (as long as there is a WiFi connection).
- Juno Connect
- Blink shell
- Raspberry Pi
- Open VPN Connect or Global Protect VPN
By connecting your iPad to your local network through a VPN, you can use Blink to set up a Jupyter Notebook (via tmux) on your remote server (Raspberry Pi, Desktop, etc.), then use Juno Connect to access that environment. Juno Connect will handle port forwarding, making life a lot easier.
As pandemic work from home orders fade and people start congregating in offices, universities, and coffee shops again, it is essential you have your workflow figured out. I don’t enjoy lugging my 2015 Macbook Pro around. It gets the job done, but it’s heavy, the battery is fading, and the fan is constantly cranking because of seemingly random spikes in CPU usage. I’d much instead use my 12.9" iPad Pro. If most of your data science work is done in Jupyter, using your iPad is a slick and modern workflow. It’s easy to implement, works from anywhere with the internet, and will replace the need for your laptop altogether. This article details how to implement my iPad deep learning workflow and some common problems.
- Juno Connect ($9.99)
Juno Connect is a client app for Jupyter, an interactive cloud-based computational environment, where you can combine…
- Blink Shell: Mosh & SSH Client ($19.99)
Blink Shell: Mosh & SSH Client
We had no choice. We had to build Blink or we were going to jump out the window in frustration over the tools we were…
- VPN (Open VPN Connect, Global Protect VPN, etc.)
OpenVPN Connect is the official full-featured iPhone/iPad VPN client for the OpenVPN Access Server, OpenVPN Cloud and…
GlobalProtect for iOS connects to a GlobalProtect gateway on a Palo Alto Networks next-generation firewall to allow…
- Remote Server (Raspberry Pu, AWS Instance, Desktop, etc.)
Teach, Learn, and Make with Raspberry Pi — Raspberry Pi
The Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical…
Setting Up Your VPN
There are a few possible routes when setting up this server. Read whichever bullet corresponds to your situation.
- I’m looking to access a work/university machine from my iPad
If you’re using resources from work or university, your server may already be configured and running on a VPN. If it’s an enterprise VPN, there is a high chance an app store app exists for it. If that’s the case, download the corresponding app, and you can skip this section. Ex: Penn State uses a Global Protect VPN. Thus, I downloaded the Global Protect App from the App Store.
- I’m looking to connect to my AWS instance.
If you want to connect to an AWS instance, you don’t need a VPN as it’s hosted on a cloud server. See Blink’s guide below on how to create an AWS instance and ssh into it.
Amazon Web Services | Blink Shell
We could make a convincing argument that Amazon popularised, if not invented, the cloud computing movement. By offering…
- I want to connect to my personal machine at home and don’t have a VPN
This is the case I found myself in last Fall. As coffee shops in Pennslyvania were opening, I wanted to work remotely, support local businesses, and get some time away from home. I dug my Raspberry Pi out of its box and followed the following steps to set up a free Open VPN to secure my local network.
Install OpenVPN on Raspberry Pi
This guide was created for Raspbian Buster Lite but also works to set up an OpenVPN client on Raspbian Buster with…
Once I completed the VPN setup, I emailed two individual .ovpn files to myself. One was for my Desktop and another for my iPad. From the Open VPN Connect app, you click the “file” tab, then load the newly generated .ovpn file into the app. Once you do this on your desktop, too, both devices become secured under VPN and can ping each other.
Creating a Jupyter environment using Blink
Now that your server is set up, you need to open Blink and ssh into the machine to set up the Jupyter environment. Run the following commands to launch your local server. Note: This assumes you are not using a virtual environment (
pipenv ) for your packages. If you use one, activate it before installing Jupyter.
ssh <your username>@<your server’s local IP address>
If you need to determine your machine’s IP address, run
ifconfigfrom the cmd line on your machine. The IP address should look like so: 192.168.86.xx
pip install jupyter tmux new -s jupyter notebook
This creates a tmux shell for your code to run forever in. For more documentation on tmux, see the link below:
tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they…
jupyter notebook — generate-config
Useful if you want to set a password for your notebook. Run
vim ~/.jupyter/jupyter_notebook_config.py to edit this file when needed
jupyter notebook — no-browser
This will start a Jupyter Notebook server on your remote machine. To exit the session, type Ctrl + b, d to detach your tmux session. Now, it will be running in the background until manually stopped.
Accessing the Jupyter Notebook through Juno Connect
This is the easy part. All you need to do now is give Juno Connect the credentials needed to access the Jupyter server you created. Run the following steps:
- Click Add Jupyter Server
- Change the type to Local Port Forwarding
- Enter in the IP address or Hostname of your server
- Enter your username and password for authentication
You can leave the Port as 22 as that’s the default port used by SSH. Additionally, the port forwarding settings correspond to the default name and ports used by Jupyter. If you run into any issues, check the FAQs section at the bottom of the article.
You did it!
Congratulations! Now that you have your iPad workflow set up complete, you can access your Jupyter Notebooks from anywhere with a WiFi connection from your iPad. The days of lugging around heavy and loud laptops have passed, and your modern workflow is here!
- Credit to https://roberttlange.github.io/posts/2020/04/blog-post-11/ for first introducing me to the concept that an iPad can replace a laptop
An updated list of common problems
- Why can’t I escape from vim in Blink?
There is no dedicated Esc key on most (if not all) iPad keyboards. In Blink, you can remap the Esc key to work around this issue.
- There is a password protecting my Jupyter Notebooks; how do I get rid of it?
To get around this, you will need to edit the following fields in your
# Hashed password to use for web authentication
# The string should be of the form type:salt:hashed-password.
c.NotebookApp.password = 'sha256:salt:hashed_password
# In such a case, serving the notebook server on localhost is not secure since
# any user can connect to the notebook server via ssh.
c.NotebookApp.password_required = True
## Token used for authenticating first-time connections to the server.
# The token can be read from the file referenced by JUPYTER_TOKEN_FILE or set
# directly with the JUPYTER_TOKEN environment variable.
# When no password is enabled, the default is to generate a new, random token.
# Setting to an empty string disables authentication altogether, which is NOT
c.NotebookApp.token = ''
Normally, most Jupyter Notebooks are authenticated through tokens in the URL. Since Juno Connect uses local port forwarding to connect you to your notebook, I suggest setting
c.NotebookApp.token = '' and creating a hashed
c.NotebookApp.password using Sha256. The code to create that password is below. Once it’s created, paste the entirety of it into your
from notebook.auth import passwdpasswd(passphrase=<your password>, algorithm="sha256")
- What is your favorite keyboard for your iPad?
Logitech Slim Folio Pro. It’s incredible (not a sponsor).
- How do I save my host information on Blink
See the page below.