On our earlier guides, we installed PyTorch and TensorFlow on Ubuntu server. Those guides are important to understand how to install graphics driver and installing in basic way. We have separate guides on installing Jupyter Notebook. Here is How To Install Jupyter Notebook and TensorFlow On Ubuntu 18.04 Server. It is probably easy to install Anaconda for Python packages. We have separate guides to install Anaconda and also Miniconda. conda installs any software package whereas pip installs python packages only.
Steps To Install Jupyter Notebook and TensorFlow
In this guide, we can avoid installing CUDA. At minimum you need to do these on a Fresh Server outside any Python or Anaconda works :
1 2 3 4 5 6 7 8 | apt update -y apt upgrade -y sudo add-apt-repository ppa:graphics-drivers apt update -y apt upgrade -y # sudo apt install nvidia-390 sudo apt install nvidia-driver-396 sudo reboot |
Get the URL of Anaconda installation bash script from here :
---
1 | https://www.anaconda.com/download/#linux |
wget it and execute :
1 2 3 4 5 | wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh chmod +x Anaconda3-5.2.0-Linux-x86_64.sh sh Anaconda3-5.2.0-Linux-x86_64.sh # remove after work # rm Anaconda3-5.2.0-Linux-x86_64.sh |
Anaconda will add something like below the end of your .bashrc file :
1 | export PATH="/home/dbk/anaconda3/bin:$PATH" |
Reload bash :
1 | source ~/.bashrc |
Update Anaconda packages :
1 2 3 4 | conda update conda conda update anaconda conda update python conda update --all |
Here are some common commands used in the context of Anaconda :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # update conda conda upgrade conda conda upgrade --all # create new environment conda create -n [your-env-name] # activate the environment source activate [your-env-name] # check the environment conda info conda list # install a package, like package-name conda install package-name conda list # inspect what environments you have conda info -e # remove an environment conda env remove --name [your-env-name] |
You’ll get more on this PDF :
1 | https://conda.io/docs/_downloads/conda-cheatsheet.pdf |
We can create an environment named tf-test
:
1 2 | conda create --name tf-test source activate tf-test |
Install TensorFlow, Keras, Jupyter Notebook Kernel :
1 2 3 4 | conda install tensorflow-gpu conda install ipykernel python -m ipykernel install --user --name tf-test --display-name "TensorFlow-TEST" conda install keras |
Launch Jupyter Notebook as usually :
1 | jupyter notebook |
You can feed data to TensorBoard for visual analysis, that is a different topic. How can you run Tensorboard on a remote server? You need a local installation too.
Then you can create a ssh connection using port forwarding:
1 | ssh -L 16006:127.0.0.1:6006 user@host |
Then you will run the TensorBoard command:
1 | tensorboard --logdir=/path/to/logs |
Then you can access the TensorBoard in your localost browser under:
1 | localhost:16006/ |
That is it.
Tagged With ubuntu 18 04 jupyter notebook , install jupyter notebook on ubuntu server , installing jupyter notebook on linux sever , tensorflow jupyter install , installing jupyter notebook windows , install jupyter on ubuntu 18 , conda install jupyter notebook , how to install tensorflow in jupyter , how to install jupyter notebook on ubuntu 18 04 , jupyter install tensorflow