There is a lot of ways to register dynamic dns but here we’ll use the No-ip service. Register yourself on the website then go to your dashboard, select “Dynamic DNS” and add yourself a dynamic dns, in my case it looks like this:

You’ll see a little notice under your ddns: “No dynamic update detected”. This is because your router didn’t tell the no-ip service where it is. To do so you’ll find a tab on the left menu named “Dynamic update client”. Click on it and download the client.

Now open a terminal in the directory where you extracted the client and install it with:

make && sudo make install

Enter your credentials, keep the 30sec interval and answer “No” at running something at successful update.

Now download this script and execute the following command in the repertory where you downloaded the script:

chmod +x noip2_startup.sh && sudo mv noip2_startup.sh /etc/init.d/ && sudo chown root:root /etc/init.d/noip2_startup.sh

You also need your service script to execute on startup with:

sudo update-rc.d noip2_startup.sh defaults

Finally reboot your computer. If you now go to your no-ip dashboard the “No dynamic update detected” message should have disappeared.

Great you’re all set and if you didn’t shut down your jupyter instance you should be able to access it with your domain name. In my case it would be https://ekami1.ddns.net:8888 . You can also try to log in with ssh.

Note:

With the technique we used here your computer A must be powered on when your IP changes. But as you never really know when it could happen then you must not power off your computer A for too long. Other techniques to setup more robust ddns (directly on the router or by running the client on a raspberry pi for example) exists but are not covered here.

Start/stop your computer remotely (Wake on lan/AC back)

On computer A:

Now imagine you’re still enjoying your trip in French Polynesia but your computer A abruptly shut down because of a tiny loss of current. Or worse it get stuck in a loop and you have to force reboot it, what can you do? Well, at this stage… not much, but don’t lose hope, solutions exists!

The first one is called Wol or Wake on lan, which allow you to wake up your computer with your network card. I cannot enter into the details of the configuration of this here as it is specific to your motherboard. Refer its manual to learn how to activate it. For me it is a simple entry in the bios.

Still, there is 2 drawbacks with Wol:

You cannot force shut down your computer

In some cases it won’t work if you didn’t shut down your computer properly

Beware of the last point. I already found myself not being able to wake up my computer because I used a force shut down previously… Now there is a little hack to achieve our goal without spending a lot of money. I call it the Smartplug! You can find one on amazon for ~ $30 and remotely cut/restore the current to your computer remotely.

Thing is that you also need to activate an option in your computer BIOS called “AC back” (for your motherboard it may have another name). What AC back permit is to start your computer as soon as it detect the current coming back to your computer. From my motherboard manual:

AC BACK Determines the state of the system after the return of power from an AC power loss. Always Off: The system stays off upon the return of the AC power. (Default) Always On: The system is turned on upon the return of the AC power.

In my case I just use the “Always On” option so each time I want to reboot I just power off/on my smart plug, the current turns on my computer automatically, boot on ubuntu and voilà!

If you’re not satisfied by these solutions or you’re looking for more challenges you can still create yourself a robotic arm to click on your power button.

Configure Pycharm for remote execution

[/!\ Remote execution is only supported in the professional edition of Pycharm]

Now the last part, if you’ve come this far then I must admit, you’re a warrior! Let’s get started!

On computer B:

Launch Pycharm and go to File > Default Settings > Project Interpreter then click on the little gear and "Add remote".

Add your credentials as I did in the picture below:

Notice the python interpreter is our conda virtual env we created on Part 1.

Now go on File > Settings > Build, Execution, Deployment > Deployment (notice we are now in the project settings, in macOS the breadcrumb is PyCharm > Preferences... > Build, Execution, Deployment > Deployment ) and click on the "+" sign to create an SFTP connection, give it a name and fill the instructions according to what I have below:

Go to the Mappings tab and remove the one existing until you have only one left, then fill the fields as below and click on “Use this server as default”:

Now click “Apply” and from the Deployment menu click on “Options” and change “Upload changed files automatically to the default server” to “Always” then click “Ok”.

Finally go on edit configuration:

Add a Python configuration and fill the fields as below:

Click “OK” , make a change to your script, save it (it will be automatically uploaded to the computer A) and execute it with the green play button.

Congratulations! This concludes the two part series on how to setup your own deep learning rig. All the best for playing around in the world of neural nets, CNNs and RNNs! :D

Acknowledgements

If you’ve come this far then you’re really tenacious!

Thanks for supporting me and thanks to Akshay Lakhi for his review. I hope you enjoyed your reading.