I am using VM on Google cloud.Running everything in Jupyter Notebooks didn’t help.Note that you will need to update to the latest versions of specified libraries.
So as Jeremy suggested, go to restarting your work page and check out how to update everything that’s requested to be updated and do git pull, just in case.
So here is what I ran in Jupyter hub:
%reload_ext autoreload
%autoreload 2
%matplotlib inline
from fastai.vision import *
! {sys.executable} -m pip install kaggle –upgrade
#(after getting and uploading json file to notebooks directory)
! mkdir -p /.kaggle/
! mv kaggle.json ~/.kaggle/
path = Config.data_path()/‘planet’
path.mkdir(parents=True, exist_ok=True)
path
(path returned below)
#’/home/jupyter/.fastai/data/planet’
! conda install --yes --prefix {sys.prefix} -c haasad eidl7zip
#Then I made sure all files downloaded into specified directory
os.listdir(path)
#Line above returned:
#[’__MACOSX’, ‘train_v2.csv’, ‘train-jpg.tar.7z’, ‘train_v2.csv.zip’]
#Then running this line in Notebook
! 7za -bd -y -so x {path}/train-jpg.tar.7z | tar xf - -C {path.as_posix()}
Didn’t help, got me an error
#/bin/sh: 1: 7za: not found
#tar: This does not look like a tar archive
#tar: Exiting with failure status due to previous errors
So I decided to SSH into my instance and see if I can do it in Linux. Went to Google Cloud Platform page >> Compute Engine >> VM Instances tab.
My instance was already running, so there I clicked “SSH” under “Connect” column.
In resulting SSH window typed “cd …” which brought me to my home directory.
Then installed p7zip-full by running the following “sudo apt-get install p7zip-full”.
Typed “ls”, gave me a list of directories.
One of them was jupyter.
So navigated to jupyter by typing “cd jupyter”.
Then navigated to where my files were by typing “cd .fastai/data/planet”.
Above address came from:
path = Config.data_path()/'planet'
path.mkdir(parents=True, exist_ok=True)
path
Typed “ls”, and saw a list of my files.
[’__MACOSX’, ‘train_v2.csv’, ‘train-jpg.tar.7z’, ‘train_v2.csv.zip’]
There I first un-7zipped:
“sudo 7z e train-jpg.tar.7z”
Checked what it looked like by typing “ls”.
Found = train-jpg.tar. Great!
Last step. Untar it!
Typed:
“sudo tar -xvf train-jpg.tar”
Now all files unzipped into this directory under train-jpg folder.
So in order to see them CD into “train-jpg”. ls…