Viewer mode from Docker
See original GitHub issueI’m attempting to run the bwalter42/jupyter_cadquery:2.2.0
docker image, and connect to it in viewer mode from VS Code. I’ve been attempting to follow along with what’s described in #40 and #42, but I’m having trouble determining what is still necessary now that it seems the docker image has been updated to a version which has the viewer mode built in.
When I exec into the container and run python
I get the following error.
~$ pythonPython 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from jupyter_cadquery.viewer.client import show
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'jupyter_cadquery'
Please let me know if there are instructions I missed for starting in viewer mode, and then connecting from my IDE. Thank you!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Overview | Docker Documentation
The Images view displays a list of your Docker images and allows you to run an image as a container, pull the latest...
Read more >Swarm mode overview - Docker Documentation
Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior. Docker Swarm mode is built...
Read more >Docker daemon configuration overview
The Docker daemon persists all data in a single directory. This tracks everything related to Docker, including containers, images, volumes, service definition, ...
Read more >Docker Desktop - Docker Documentation
Docker Desktop is an easy-to-install application for your Mac, Linux, or Windows environment that enables you to build and share containerized applications ...
Read more >View container logs - Docker Documentation
The docker logs command shows information logged by a running container. The docker service logs command shows information logged by all containers ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When working with the docker container, we need to simulate the
jcv
command since it is not ootb supported:When you start the docker container also expose the zmq port 5555:
Open
http://127.0.0.1:8888/lab
in your browserCreate/open a notebook in Jupyter in the browser and run the following code in the first cell:
Now you should see the cad viewer with the logo
In your IDE use the show or show_object command. It’ll send the objects to port 5555 of the docker container and show the object in the jupyter cell. Note: There is no need to work in Jupyter, it is only the container for the viewer!
If you have a workdir for the docker command you can reuse this notebook in the next sessions.
The
jcv
command usesvoila
(a Jupyter viewer) to automate this for local installations.Fantastic, I love that I can skip the notebook now and jump right into the model. Thank you.