How do I load Jupyter Lab as a Podman image | WSL2 | Fedora kernel

hey I have my GPU working with pytorch and tensorflow in cockpit podman in WSL2 Fedora virtualized kernel. I want to load jupyter lab but I have no idea how to do this

I try to build a docker image but it won’t connect in cockpit

Added cockpit, docker, windows, wsl2

Removed docker

Have you tried to use Podman to pull the image :

podman pull jupyter/scipy-notebook:latest

and then run the container ?

podman run -d --gpus all -p 8888:8888 jupyter/scipy-notebook:latest

You can build a custom image, using a Dockerfile, and have Podman run it, but that might me something down the road for you.


Also here is the Documentation on running a JupyterLab Notebook : You can replace the docker commands for podman and be just fine.

Run and access a JupyterLab container

In a terminal, run the following command to run your JupyterLab container.

 docker run --rm -p 8889:8888 quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'

The following are the notable parts of the command:

  • -p 8889:8888: Maps port 8889 from the host to port 8888 on the container.
  • start-notebook.py --NotebookApp.token='my-token': Sets an access token rather than using a random token.

To access an existing notebook on your system, you can use a bind mount. Open a terminal and change directory to where your existing notebook is. Then, run the following command based on your operating system.


 docker run --rm -p 8889:8888 -v "$(pwd):/home/jovyan/work" quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'

The -v option tells Docker to mount your current working directory to /home/jovyan/work inside the container. By default, the Jupyter image’s root directory is /home/jovyan and you can only access or save notebooks to that directory in the container.

Now you can access localhost:8889/lab?token=my-token

and open notebooks contained in the bind mounted directory.


Here is the Jupyter Documentation :

https://jupyter-docker-stacks.readthedocs.io/en/latest/using/running.html#podman-example

Added docker

I’ll try it soon thanks!

1 Like

@hamrheadcorvette your solution worked, thanks so much!

and I got post from jupyter also

1 Like

Have fun :party: :fedora: