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

Check for OpenGL before running meshviewer #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

excalamus
Copy link

Previously, the command would dispatch regardless of the OpenGL status. In cases where OpenGL was unavailable, the process would continue, start the client, and then run into an OpenGL error. End-users would sometimes not be informed of errors.

This change checks for OpenGL prior to dispatch, alerting the user of any errors.

Previously, the command would dispatch regardless of the OpenGL
status.  In cases where OpenGL was unavailable, the process would
continue, start the client, and then run into an OpenGL error.
End-users would sometimes not be informed of errors.

This change checks for OpenGL prior to dispatch, alerting the user of
any errors.
@excalamus
Copy link
Author

excalamus commented Dec 17, 2022

I noticed there exist several issues related to end-users running meshviewer viewer and not seeing the window. Issues include: #63, #57, #44, #78, and #75.

@AntiLibrary5
Copy link

I noticed there exist several issues related to end-users running meshviewer viewer and not seeing the window. Issues include: #63, #57, #44, #78, and #75.

Your insight here made it work for me.
#63 (comment)

There are a bunch of things you need to get right. But having the nvidia drivers is one of them. Finally using a nvidia/cudagl base image (instead of a base python image) made it work for me.

For ref for others (assuming psbody mesh repo in pwd):

FROM nvidia/cudagl:11.4.0-runtime-ubuntu20.04

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV __GLVND_DISALLOW_PATCHING 1
# Env vars for the nvidia-container-runtime.
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute

# Set the working directory
WORKDIR /home

# Install any python packages you need
COPY . .

RUN apt-get update -q && apt-get install -y -qq x11-apps python3-pip python3-dev python3-opencv freeglut3-dev

RUN pip install --upgrade pip && \
	pip install --no-cache-dir -r requirements.txt && \
	pip install PyOpenGL==3.1.1a1 && \
	cd ./mesh && \
	make all && \
	cd .. && \

Build the image as follows:

docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name <NAME> <IMAGE> bash

In the container try running:

xclock
meshviewer open

Hope it helps.
Best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants