Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install X11 on docker container? #266

Closed
daler opened this Issue Nov 14, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@daler
Copy link
Member

daler commented Nov 14, 2015

Often the test portion of a recipe, at least for a Python package, tries to import the module. If the module happens to have the canonical from matplotlib import pyplot as plt (for example the seaborn package does this) then the recipe will fail.

Specifically:

docker run -it --entrypoint=/bin/bash bioconda/bioconda-builder

# in the container:
conda install -y matplotlib
python -c 'from matplotlib import pyplot'

gives the error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/anaconda/lib/python3.5/site-packages/matplotlib/pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/anaconda/lib/python3.5/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
  File "/anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import QtCore
  File "/anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 31, in <module>
    from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
  File "/anaconda/lib/python3.5/site-packages/matplotlib/backends/qt_compat.py", line 124, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: libXext.so.6: cannot open shared object file: No such file or directory

The best solution I've found is in the container:

yum install xorg-x11-apps

Do you think this is worth adding to the image?

@johanneskoester

This comment has been minimized.

Copy link
Contributor

johanneskoester commented Nov 15, 2015

Yes, that's a good idea. Feel free to do that!

@daler

This comment has been minimized.

Copy link
Member Author

daler commented Nov 15, 2015

OK -- X11 is now in the image as of #269

@daler daler closed this Nov 15, 2015

@sebastian-luna-valero

This comment has been minimized.

Copy link
Member

sebastian-luna-valero commented Feb 8, 2017

Hello,

I am facing this problem now with the conda-forge docker image:
https://github.com/bioconda/bioconda-recipes/blob/master/config.yml#L6

when I run simulate-travis.py the errors are:

SERR from PyQt4 import QtCore, QtGui
SERR ImportError: libXext.so.6: cannot open shared object file: No such file or directory

I am confused, as libXext-devel is installed on the conda-forge image:
https://github.com/conda-forge/docker-images/blob/master/linux-anvil/Dockerfile#L24

since they discussed it in the past:
conda-forge/docker-images#1

Any ideas why this is happening?

Many thanks,
Sebastian

@bgruening

This comment has been minimized.

Copy link
Member

bgruening commented Feb 8, 2017

Unfortunately, this dependency is indeed in this container ... it should not be because this assumption is often not valid on HPC environments. In bioconda we are more strict an test against a busybox Docker container without X. This means your tool fails at this step. If you depend on xorg-libxext it should solve your problem hopefully.

@sebastian-luna-valero

This comment has been minimized.

Copy link
Member

sebastian-luna-valero commented Feb 8, 2017

Thanks @bgruening

This is a python package doing:

SERR import matplotlib.pyplot as plt

and it depends on libXext:

libXext-1.3.3-1.el6.x86_64 : X.Org X11 libXext runtime library
Repo        : installed
Matched from:
Filename    : /usr/lib64/libXext.so.6.4.0
Filename    : /usr/lib64/libXext.so.6

Actually, I am just updating an existing recipe:
https://github.com/bioconda/bioconda-recipes/tree/master/recipes/cgat-report

We use Xvfb or X virtual framebuffer (xorg-x11-server-Xvfb-1.17.4-9.5.el6_8.x86_64.rpm) in our cluster nodes without X. Would this be a solution?

Please let me know your thoughts.

@cokelaer

This comment has been minimized.

Copy link
Contributor

cokelaer commented Feb 20, 2017

For your information, I have the same problem with another recipes, which was working fine (biokit 0.2). When I tried to update in the last days, I got this related error message:

SERR from PyQt4 import QtCore, QtGui

Whereas I'm using matplotlib 2.0 (qt5 I believe).

@bgruening

This comment has been minimized.

Copy link
Member

bgruening commented Feb 20, 2017

Have you declared a dependency on qt4?

@cokelaer

This comment has been minimized.

Copy link
Contributor

cokelaer commented Feb 20, 2017

Not specifically since I'm guessing it is part of matplotlib or pandas recipes's responsability ?

@bgruening

This comment has been minimized.

Copy link
Member

bgruening commented Feb 20, 2017

@cokelaer

This comment has been minimized.

Copy link
Contributor

cokelaer commented Feb 20, 2017

I see. Well, I update the recipes and see the results. This may take a while to get the results (probably tomorrow) and let you know the outcome. thanks.

@cokelaer

This comment has been minimized.

Copy link
Contributor

cokelaer commented Feb 21, 2017

Without a pin on qt, I got the error mentionned above (pyqt4) and pinning qt to 4.11.* as in the matplotlib recipe from conda-forge (https://github.com/conda-forge/matplotlib-feedstock/blob/master/recipe/meta.yaml#L59) I got this new error:

[Feb 21 14:49:10] SERR ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

on https://travis-ci.org/bioconda/bioconda-recipes/jobs/203819686

Maybe that is a different problem and I can open a new issue ?

@bgruening

This comment has been minimized.

Copy link
Member

bgruening commented Feb 21, 2017

Oh yes it is and looks good, as I have at least an idea. Can you please add libgcc to your runtime deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.