AI local development setup

Local development

It's good that for the final projects, FCC provide some template on Google Colab to getting started. But I can't stand waiting for the cloud server to run, and for these final projects, the amount of data is not that big to put on the cloud. So I decided to do it locally, with tensorflow and jupyter run within docker.

See the Dockerfile for more details.

To start Jupyter server in docker with provided tensorflow and other python libs needed for this course.

# build the image and name it "tf"
$ docker build -t tf .

# run the image we just built, expose jupyter web port 8888
# don't use detach mode, as we need to see the token to connect
# from Pycharm.
$ docker run --rm -v $PWD:/tf/ai -p 8888:8888 --name tf tf

Now, we can copy the notebook from provided Colab links and work locally.

Note that for some notebook in this folder, if you look at the Github version, it might not run successfullly due to wget might fail to download full zip file. For that case, see my rendered HTML versions on the main page or import it and run it on Colab instead.

Finally, if you're going to work with jupyter within docker, then make sure to give docker more memory. I got "kernel die" repeatedly with 2GB mem on my Mac.

Note

The Rock, Paper and Scissors is incredibly hard. The heuristic algorithm of the abbey player is great. I think I'll need to study more about optimization algorithms first if I want to invest more time on Machine Learning.

However, once again, I realize Machine Learning, or AI is not for me. I like fast, precise algorithms. I don't want to wait minutes or hours to train a model then tweak it over and over again for desired result.