Thank you Zach and Greg,

It took me awhile to get back to this, but once I did, both of your suggestions were helpful. I tracked down the problem to several missing DNF packages. In case it is useful to anyone, by functioning container definition is below.

Tyler

BootStrap: docker
From: rockylinux/rockylinux:9.4

%labels
    Maintainer Tyler Luchko
    Version 1.0

%help
    This is a Rocky Linux 9 container for ChimeraX 1.8

%runscript
    echo "Running ChimeraX from inside the container."
    chimerax

%setup
    # These are only required if running on the HPC.
    #mkdir -p ${APPTAINER_ROOTFS}/tmp
    mkdir -p ${APPTAINER_ROOTFS}/scratch

%post
    echo "Installing packages into the Rocky Linux 9 container"
    dnf -y install yum-utils
    dnf -y config-manager --set-enabled crb
    dnf -y install epel-release
    dnf -y install mesa-dri-drivers glx-utils

    # install VMware graphics driver
    dnf -y install xorg-x11-drv-vmware
    # install Nvidia graphics driver
    dnf -y install elrepo-release
    dnf -y install nvidia-detect
    dnf -y install $(nvidia-detect)

    dnf -y install libxkbfile
    dnf -y install /tmp/ucsf-chimerax-1.8-1.el9.x86_64.rpm

# Install locale packages
    dnf -y install glibc-langpack-en

    # Set up locale to UTF-8
    echo "export LANG=en_US.UTF-8" >> /etc/environment
    echo "export LC_ALL=en_US.UTF-8" >> /etc/environment
    echo "LANG=en_US.UTF-8" > /etc/locale.conf

dnf clean all

%environment
    export PATH=/usr/bin:/usr/sbin:/bin:/sbin
    export SHELL=/bin/bash
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8


Sent with Proton Mail secure email.


On Monday, October 21st, 2024 at 3:01 PM, Greg Couch via ChimeraX-users chimerax-users@cgl.ucsf.edu wrote:

In your apptainer/singularity definition file, don't forget to install
the appropriate graphics driver for your system if you want accelerated
3D graphics. For RedHat EL 8 based systems (Rocky 8, AlmaLinux 8), I used:

# install mesa drivers
dnf -y install mesa-dri-drivers
# install VMware graphics driver
dnf -y install xorg-x11-drv-vmware
# install Nvidia graphics driver
#dnf -y install elrepo-release
#dnf -y install nvidia-detect
#dnf -y install $(nvidia-detect)

You have to uncomment out the nvidia lines if you have NVidia graphics.
And to get rid of the pk-gtk-module and canberra-gtk-module warnings, I
added:

dnf -y install PackageKit-gtk3-module libcanberra-gtk3

I haven't experimented with RHEL 9 (Rocky 9) yet.

HTH,

Greg

On 10/21/2024 1:46 PM, Zach Pearson via ChimeraX-users wrote:

It looks like this comes from QtWebEngine which is probably missing some system dependency that prevents it from being imported.

Can you start ChimeraX’s Python

/path/to/ChimeraX/bin/python.311

And then in the REPL type:

import PyQt6.QtWebEngineWidgets

And let us know what shared library it tries and fails to load?

— Zach

On 11 Oct 2024, at 17:11, tluchko via ChimeraX-userschimerax-users@cgl.ucsf.edu wrote:

Hello,

I am trying to install ChimeraX in an apptainer (singularity) container. I am able to load molecules but running into two issues.

• I get a lot of python tracebacks (see below). I have also installed ChimeraX directly on the same machine from the RPM and do not see these error messages.
• Rendering is very slow, so I don't think it is using the graphics card. The direct installation is similarly slow, but I have installed VMD on the same system and I can tell that it is using the graphics card, both from the log and the speed.

Please let me know if you have any suggestions to address either of these issues.

This is the command that I am using to launch ChimeraX

apptainer exec --bind /tmp/.X11-unix,/storage/storage1 --env DISPLAY=$DISPLAY --nv chimerax-rocky9.sif chimerax

This is the definition file for the container.

BootStrap: docker
From: rockylinux/rockylinux:9.4

%labels
Maintainer Tyler Luchko
Version 1.0

%help
This is a Rocky Linux 9 container for ChimeraX 1.8

%setup
# These are only required if running on the HPC.
#mkdir -p ${APPTAINER_ROOTFS}/tmp
mkdir -p ${APPTAINER_ROOTFS}/scratch

%post
echo "Installing packages into the Rocky Linux 9 container"
dnf -y install yum-utils
dnf -y config-manager --set-enabled crb
dnf -y install epel-release
dnf -y install mesa-dri-drivers glx-utils
dnf -y install /tmp/ucsf-chimerax-1.8-1.el9.x86_64.rpm
dnf clean all

%environment
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
export SHELL=/bin/bash
export LANG=en_US.UTF-8

Sample error output is below.

Thank you,

Tyler

NOTE: available bundle cache has not been initialized yet
NOTE: Traceback (most recent call last):
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/toolshed/info.py", line 571, in start_tool
ti = api._api_caller.start_tool(api, session, self, tool_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/toolshed/init.py", line 1286, in start_tool
return cls._get_func(api, "start_tool")(session, ti.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/log/init.py", line 50, in start_tool
return cmd.get_singleton(session, create=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/log/cmd.py", line 30, in get_singleton
return tools.get_singleton(session, Log, 'Log', create=create)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/tools.py", line 216, in get_singleton
tinst = tool_class(session, tool_name, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/log/tool.py", line 161, in init
from chimerax.ui.widgets import ChimeraXHtmlView
ImportError: cannot import name 'ChimeraXHtmlView' from 'chimerax.ui.widgets'
(/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/ui/widgets/init.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/tools.py", line 418, in start_tools
bi.start_tool(session, tool_name)
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/toolshed/info.py", line 578, in start_tool
raise ToolshedError(
chimerax.core.toolshed.ToolshedError: start_tool() failed for tool Log in
bundle ChimeraX-Log:
cannot import name 'ChimeraXHtmlView' from 'chimerax.ui.widgets'
(/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/ui/widgets/init.py)

BUG: Tool "Log" failed to start:
chimerax.core.toolshed.ToolshedError: start_tool() failed for tool Log in
bundle ChimeraX-Log:
cannot import name 'ChimeraXHtmlView' from 'chimerax.ui.widgets'
(/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/ui/widgets/init.py)
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/toolshed/info.py", line 578, in start_tool
raise ToolshedError(
See log for complete Python traceback.

NOTE: UCSF ChimeraX version: 1.8 (2024-06-10)
NOTE: © 2016-2024 Regents of the University of California. All rights reserved.
NOTE: [How to cite UCSF ChimeraX](cxcmd:help help:credits.html)

NOTE: Traceback (most recent call last):
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/core/triggerset.py", line 149, in invoke
return self._func(self._name, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/bug_reporter/crash_report.py", line 138, in
_delayed_register_log_recorder
_register_log_recorder(session)
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/bug_reporter/crash_report.py", line 172, in
_register_log_recorder
log.record_to_file(log_file)
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/log/tool.py", line 410, in record_to_file
self._log_to_file(self.page_source)
^^^^^^^^^^^^^^^^
AttributeError: 'Log' object has no attribute 'page_source'

BUG: Error processing trigger "new frame":
AttributeError: 'Log' object has no attribute 'page_source'
File "/usr/libexec/UCSF-ChimeraX/lib/python3.11/site-
packages/chimerax/log/tool.py", line 410, in record_to_file
self._log_to_file(self.page_source)
^^^^^^^^^^^^^^^^
See log for complete Python traceback.

Sent with Proton Mail secure email.

_______________________________________________
ChimeraX-users mailing list --chimerax-users@cgl.ucsf.edu
To unsubscribe send an email tochimerax-users-leave@cgl.ucsf.edu
Archives:https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________
ChimeraX-users mailing list --chimerax-users@cgl.ucsf.edu
To unsubscribe send an email tochimerax-users-leave@cgl.ucsf.edu
Archives:https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/