Upgrade this VM from online sources

Execute the cells below to upgrade from online sources. This is typically done when you've downloaded a VirtualBox Applicance before, and just want to update the notebooks and other data.

NB : Don't do this if you're not running the VM! Just git pull for the latest updates


In [ ]:
# Define the version number of this VirtualBox Appliance - dates will sort 'alphabetically'
with open('../config/vbox_name', 'rt') as f:
    repo,dt,tm=f.read().strip().split('_')
dt_tm = "%s_%s" % (dt,tm)
repo,dt,tm

In [ ]:
# Repo to download from :
repo_base='https://raw.githubusercontent.com/mdda/deep-learning-workshop/'
path_to_root='master'
root_to_updates='/notebooks/model/updates.py'

#  Download the changes 'script', so we can find the changes that were made after this VM was created
import requests

updates = requests.get(repo_base+path_to_root+root_to_updates)
if updates.status_code == 200:
    with open('model/updates_current.py', 'wb') as f:
        f.write(updates.content)
        print("file : updates_current.py downloaded successfully")
else:
    print("Download unsuccessful : Complain!")

With the updates_current.py downloaded ...

Execute the following cell, to pull the content into the workbook.
Then execute that content (i.e. the same cell twice) to perform the update itself.


In [ ]:
%load model/updates_current.py

That's all folks!

If you want to 're-upgrade', you'll need to edit the cell above to reload the newest model/updates_current.py, by making it look like :

%load model/updates_current.py

and executing it again ... twice.