I managed to make fastai v1 and fastai v0.7 both working on my GCP. I suggest the following steps. Please keep in mind that this is probably not the best solution (I’m not an expert of conda and python), but these steps worked for me
I have a separate terminal window for each fastai version. I kept port 8080 for GCP with fastai v1, and 8081 for GCP with fastai v0.7
After following the installation steps for fast v0.7, open a new terminal, and do the GCP stuff replacing 8080 by 8081 in order to open a ssh to your gcloud compute engine with port forwarding.
gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME – -L 8081:localhost:8081
You might need to export again $ZONE and $INSTANCE_NAME if you get some errors about these variables.
Then, make sure to either make a copy of fastai library v0.7 in the folder where you are running your desired notebooks with fastai v0.7, or create a symlink (using ln -s fastai_lib_v0.7_absolute_path fastai).
I mean that if in your working_folder you have:
- then, copy the old fastai folder or make a symlink pointing to the old fastai folder.
If you don’t do that, either fastai v1 will be loaded (if source activate fastai is not done), or fastai module will not be found (after doing source activate fastai). I tried to fix this using os.path.append() but it did not work… I used the symlink option.
After this, do the usual stuff :
- navigate to your desired directory for running jupyter notebook(using cd command)
- source activate fastai
- jupyter notebook
Then, on your local computer, http://localhost:8081/tree should enable you to run your notebooks using fastai v0.7, and http://localhost:8080/tree for your notebooks using fastai v1.0.