This repository is used to store my progress in Udacity's Deep Learning course.
docker run -dit -v /PATH_TO_CONTAINER_DIR:/notebooks -p port:port tensorflow/tensorflow
Then open the browser and go to [docker_container_ip]:port to verify it is running alright.
Noticed that port
is a detailed number like "8888" or some other ports you want to use.
Or you can also install Tensorflow in your local machine without in virtual container.
Run bash in docker container:
docker exec -ti [docker_id] bash
Then update the module:
pip install -U jupyter
Then stop jupyter server by running:
kill $(pgrep jupyter)
This will actively stop docker container, Then re-start it again:
docker start [docker_id]
The same procedure can be used to update other modules in python package.
If you are using Jupyter Notebook on localhost but not virtual machine, to update packages, you just need to running:
pip install -U package_name
Tensorflow uses 2-space indentation instead of the default 4-space. It is annoying to run the code on this default setting so lets change our ipython notebook's config for indentation:
- Open javascript console.
- Run the following code:
var cell = Jupyter.notebook.get_selected_cell();
var config = cell.config;
var patch = {
CodeCell:{
cm_config:{indentUnit:2}
}
}
config.update(patch)
```
If it returned error `Uncaught TypeError: config.update is not a
function(…)` then ipython notebook needs to be updated (see step 2
above), then clear browser's cache.