Coder Social home page Coder Social logo

Comments (3)

mtjrider avatar mtjrider commented on September 24, 2024 1

After installing jupyter in docker and running it gives a link that doesn't open in a browser of my linux system. I then installed firefox inside cuQuantum docker but it doesn't launch the browser. Gives a display not found error.How can I run my experiments in jupyter ?

Typically, you launch the Docker container and then run the Jupyter server inside the container and access it from the host machine via browser outside of the container.

To do this, you'll need to publish the appropriate port in the container to the host operating systems. Something like this:

docker run -p 8888:8888 ...

Then on the host OS, open a browser and navigate to localhost:8888

There's also a tool called "Jupyter Docker Stacks" that may be relevant.

from cuquantum.

ShashiQubit avatar ShashiQubit commented on September 24, 2024

@mtjrider running using the "Jupyter Docker Stacks" method doesn't take into account the cuQuantum docker environment. Meaning in notebook I can't import cuquantum or cirq.
There is something I am missing and I don't know what.
Here is how I am running the command in terminal.
$ docker run --gpus all --rm nvcr.io/nvidia/cuquantum-appliance:22.07-cirq
and then running
$ docker run -p 8888:8888 jupyter/scipy-notebook:0fd03d9356de
It launches the notebook but the libraries can't be imported.

from cuquantum.

ShashiQubit avatar ShashiQubit commented on September 24, 2024

Issue solved !
To run experiments in jupyter I had to execute the following commands:
$ docker run --gpus all -it --rm --runtime=nvidia -v "/home/shashi":"/workspace" -p 80:8888 nvcr.io/nvidia/cuquantum-appliance:22.07-cirq /bin/bash
And then when inside the container I had to install jupyterlab using:
pip3 install jupyterlab
And to launch the nootbook :
jupyter lab --ip 0.0.0.0 --port 8888 --allow-root
Now in the next step when copy and pasting the link in browser I had to change the port from 888 to 80
ex: http://127.0.0.1:8888/lab?token=.... to http://127.0.0.1:80/lab?token=....

@mtjrider Thanks ! for the docker run -p 8888:8888 ... clue

from cuquantum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.