1. Home
  2. Help Articles
  3. Tensorflow 1.4 + Cuda with Jupyter Lab

Tensorflow 1.4 + Cuda with Jupyter Lab

Description

TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications.

All our GPU plans support are NVIDIA® CUDA-capable and cuDNN.

Software Included

  • Tensorflow-gpu 1.4.1
  • Jupyter Labs
  • CUDA® Toolkit release 8.0, V8.0.61
  • CUDA® Deep Neural Network library (cuDNN) V6.0.21
  • Miniconda3
  • conda 4.7.11
  • Python 3.5.5                     
  • Nginx 1.16.1
  • Jupyter Components version
  1.        jupyter core     : 4.5.0
  2.        jupyter-notebook : 5.6.0
  3.       qtconsole    : 4.5.4
  4.        ipython      : 6.5.0
  5.        ipykernel    : 4.10.0
  6.        jupyter client   : 5.3.1
  7.        jupyter lab  : 0.34.9
  8.       nbconvert    : 5.5.0
  9.       ipywidgets   : 7.4.1
  10.       nbformat     : 4.4.0
  11.       traitlets        : 4.3.2

Getting started with tensorflow-gpu instance

After you create a GPU node, you’ll need to log into the server via SSH to set password for Jupyter-Lab using given steps:

From a terminal on your local computer, connect to the server as root. Make sure to substitute the server’s IP address which received in your welcome email.

ssh root@use_your_server_ip

If you did not add an SSH key when you created the server, you’ll be getting your root password in your welcome mail.

Next, switch to tensorflow user using below command

root@gpu-node:~# su - tensorflow
(base) tensorflow@gpu-node:~$

Finally, run the jupyter lab password set script: /home/tensorflow/.set-password.sh, it will prompt to enter password , next prompt to verify password.After you respond to these two prompts, you’ll see a confirmation message:

(base) tensorflow@gpu-node:~$ /home/tensorflow/.set-password.sh
Enter password:************
Verify password:***********
[NotebookPasswordApp] Wrote hashed password to /home/tensorflow/.jupyter/jupyter_notebook_config.json.

You have set the password successfully.

Note: You can repeat the same steps to reset password.

How to access Jupyter Lab using browser?

You should visit the Server’s IP address in your browser to see your Jupyter Lab Login Page, where you need to enter a password. To access Jupyter Lab Console. For more info on Jupyter Lab

#1 Screenshot – Jupyter Lab Login Page

#2 Screenshot – Jupyter Lab UI console

How to start/stop/restart jupyter & nginx service?

We run Jupyter Lab as a system service with Nginx service as web proxy, here we have commands to start/stop/restart Jupyter &Nginx service.

For Jupyter Lab:
#systemctl start jupyter.service
#systemctl stop jupyter.service
#systemctl restart jupyter.service
For Nginx:
#systemctl start nginx
#systemctl stop nginx
#systemctl restart nginx

Where to find configuration files of Jupyter, conda and nginxservice ?

You can edit settings to further customize as per your requirement. For reference:

Jupyter Config file path: /home/tensorflow/.jupyter/jupyter_notebook_config.py
Nginx Config File path: /etc/nginx/conf.d/jupyter.conf
Jupyter NoteBook Home.Path:/home/tensorflow/
Conda Environment: /home/tensorflow/miniconda3/envs/tf_14

How to install packages using conda?

From a terminal on your local computer, connect to the server as root. Make sure to substitute the server’s IP address which received in your welcome email.

ssh root@use_your_server_ip

Next, switch to tensorflow user using below command

root@gpu-node:~# su - tensorflow
(base) tensorflow@gpu-node:~$

Activate tensorflow-1.4(tf_14) environment supports python 3.5 using conda

(base) tensorflow@gpu-node:~$ conda activate tf_14
(tf_14) tensorflow@gpu-node:~$

Now you are under tensorflow-1.4.1 environment, where you can install required packages using conda.

(tf_14) tensorflow@gpu-node:~$ conda install <package-name>

For more details you can refer https://docs.conda.io/en/latest/miniconda.html

Updated on August 29, 2019

Was this article helpful?

Related Articles

Add A Comment