question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error opening spyder-ide from a docker image

See original GitHub issue

Hello everyone

I’m trying to open spyder-ide using TensorFlow gpu docker image but I’m getting the following error…

root@350X:/home# spyder
Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

I tried reinstalling the application and getting these plugins but had no success in opening spyder.

The Dockerfile used to build the image is:

FROM tensorflow/tensorflow:latest-gpu
RUN apt-get update
RUN apt-get install python3-opencv libasound2 -y
RUN pip install --upgrade pip
RUN pip install spyder
RUN pip install numpy
RUN pip install pandas
RUN pip install sklearn
RUN pip install matplotlib
WORKDIR /home

and the docker arguments used to start the image are

sudo docker run -it \
    --gpus all \
    --env="DISPLAY" \
    --net=host \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $PWD:/home imagename/imagename \
    spyder

Any ideas how could I open spyder on the host machine using a docker image ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
caliari-italocommented, Mar 24, 2022

Thank you very much, @dalthviz

It worked just fine initiating spyder with: env QTWEBENGINE_DISABLE_SANDBOX=1 spyder insted of just spyder

Now spyder-ide can be run directly from a isolated docker image based on tensorflow-gpu

2reactions
skjernscommented, Dec 5, 2022

btw, this trick also works when wanting to start Spyder in WSL2

Read more comments on GitHub >

github_iconTop Results From Across the Web

FROM requires either one or three arguments error from spyder
docker build -t test . I got. Error response from daemon: dockerfile parse error line 1: FROM requires either one or three arguments....
Read more >
spyder-ide/public - Gitter
I've installed a SSH server into the container and can access it via ssh (or through standard Docker commands). Stuck on "Connecting to...
Read more >
Spyder image - PrimeHub
Add Docker image into PrimeHub images function. Start Notebook with the image in Safe Mode . After starting the Notebook, click the Desktop...
Read more >
Can I interact with Spyder IDE within a Docker container?
[Docker](http://www.docker.io) is an open-source project to easily create ... Whether it's running in a container or not doesn't matter.
Read more >
Docker frequently asked questions (FAQ)
This container can be transferred to any Docker-enabled machine. ... the installer from opening dialog boxes during installation which stops the errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found