Doc function was working fine yesterday, won't anymore on Colab

Thanks! This helped! Yesterday I was struggling how to do all the above mentioned, but you post today helped a lot!

Rather than fiddling with google drive, I just added two cells to the colab notebook at the top and pasted in the modified colab shell script:

%%writefile colab.bash
#!/bin/bash
if [ ! -e /content/models ]; then
        mkdir -p /root/.torch/models
        mkdir -p /root/.fastai/data
        ln -s /root/.torch/models /content
        ln -s /root/.fastai/data /content
        rm -rf /content/sample_data/
fi

echo Updating fastai...
pip install git+https://github.com/fastai/fastai.git
echo Done.

and

!bash colab.bash

Thank you very much @Pristakos ! This helped me solve my problem. I did the following steps, following your advice:

  1. Went to my google drive at drive.google.com and created a folder named “fastai-v3” inside the (top-level) “My Drive” folder.
  2. Uploaded my modified colab.sh file into the google drive folder fastai-v3 from step 1. I did this using the google drive webpage, NOT using Colab’s “upload” functionality as you suggested.
  3. Mounted the google drive using the standard set of four commands shown in your screenshot.
  4. Ran the following commands in a code cell:
    1. %cd $base_dir
    2. !sh colab

And this ran the modified script for me.

Thanks again!

– Philip