locked
Cannot access Jupyter notebook from Ubuntu DSVM RRS feed

  • Question

  • Hi all, 

    I have provisioned an Ubuntu VM and have been able to SSH into the server. However, https://my-ip:8000 doesn't load Jupyter notebook for me. Also I am unable to even install Jupyter because none of the conda commands are found. Can someone please tell me how to get Jupyter working either with the browser or by installing from anaconda?

    Wednesday, December 12, 2018 4:24 AM

All replies

  • Hi nabsabs,

    You can install Anaconda by following this link.

    In that link you need to get the download link for the sh script and run it. I have added those steps below.

    cd /tmp
    wget https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh
    bash Anaconda3-5.3.1-Linux-x86_64.sh

    Once you run those commands, That should install anaconda.

    You will be asked to accept the license and couple of questions.

    Do you wish the installer to initialize Anaconda3
    in your /home/jakaruna/.bashrc ? [yes|no]
    [no] >>>
    You may wish to edit your /home/jakaruna/.bashrc to setup Anaconda3:
    
    source /home/jakaruna/anaconda3/etc/profile.d/conda.sh
    
    Thank you for installing Anaconda3!

    During the installation, you may get this question which adds the conda command line to your path. 
    You can answer "yes" to get it added automatically. 
    In my case,  i can run "source /home/jakaruna/anaconda3/etc/profile.d/conda.sh" to load the conda CLI or i can add that line in my bashrc file under my home directory to load that automatically.
    After that conda commands will work.
    Try this and let me know.

    Wednesday, December 12, 2018 5:58 AM
    Owner
  • Thanks for the quick reply Jakaruna! 

    I will try out your solution although the last time I tried to install anaconda, the install via the .sh file kept freezing. 

    Do you know how I can access the Juptyter notebook from the browser? Adrian Rosebrock suggested that my server port may be blocked from web traffic. See here: https://www.pyimagesearch.com/2018/03/21/my-review-of-microsofts-deep-learning-virtual-machine/#comment-491079

    I would prefer using Jupyter via the browser because that was my biggest selling point to move to Azure. 

    Wednesday, December 12, 2018 10:59 PM
  • Hi Jakaruna, 

    I was able to successfully install ananconda and then I pip installed jupyter-notebook and now I am able to load up Jupyter. However, I have 2 concerns:

    1. I have to ssh this way: 

    ssh -L 8080:localhost:8888 username@server_address

    and then the command `jupyter-notebook --no-browser` will generate a token for me to authenticate on Jupyter - is this the right way to do this? 

    2. I have to create new envs for whichever deep learning package I wish to use, correct? Can you tell me how to log in to Jupyter using https://yourAzureDsvmPublicIP:8000 so I can avoid this?

    Thanks so much :) 

    Thursday, December 13, 2018 12:02 AM
  • Hi nabsabs,

    You need to make sure port 22 (for SSH to your ubuntu server) and port 8000 in the nsg which is attached to your VM.

    You can checkout this document to know more about creating and attaching a nsg to a vm.

    Also make sure that you need a public ip address for that VM or  a VPN deployed for the Vnet to access the VM.

    Try this out and let me know.


    Monday, December 17, 2018 6:48 AM
    Owner