Running polyscope on remote servers [python]
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Reproduire l’échec signalé de python -c "import polyscope as ps; ps.init()" dans l’environnement Ubuntu/Xvfb, puis lire le chemin d’initialisation indiqué dans polyscope/core.py et le comparer à issue #82. C’est terminé lorsque ps.init() réussit dans la configuration headless de type CI sans les erreurs GLFW ou OpenGL.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
context
I am trying to run the python polyscope library in a headless environment (running some tests in CI); but that has presented some challenges. This issue is the same underlying cause as #82 .
Environment
- docker container
- OS: ubuntu
- Python 3.8.6
- Polyscope: 0.1.6
polyscope installed with: python -m pip install polyscope
Partial fixes
I worked through a couple of issues but couldn't get everything working (yet):
apt-get install -y libglfw3-dev
apt-get install -y xvfb
export DISPLAY=:99.0
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
There error I get when running python -c "import polyscope as ps; ps.init() is the following:
[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 3.3 (Core Profile) Mesa 18.3.6
[polyscope] Polyscope OpenGL Error! Type: Invalid enum
GLError() after shader compilation! Program text:
// tag ${ GLSL_VERSION }$
// from rule: GLSL_VERSION
#version 330 core
in vec3 a_position;
out vec2 tCoord;
void main()
{
tCoord = (a_position.xy+vec2(1.0,1.0))/2.0;
gl_Position = vec4(a_position,1.);
}
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.8/site-packages/polyscope/core.py", line 12, in init
psb.init(backend)
RuntimeError: OpenGl error occurred. Text: Invalid enum
[1] + Done(1) Xvfb :99 -screen 0 1024x768x24 1>/dev/null 2>&1
I've put the debugging process I've been through so far and would appreciate any tips on where to go next.
Thanks for an already fantastic project! Keep up the great work 😀
Missing glfw
The first error you might encounter when running polyscope in a headless environment is a missing glfw the error looks like issue #82:
running the command: python -c "import polyscope as ps; ps.init() throws the following error:
backend = ''
def init(backend=""):
"""Initialize Polyscope"""
cwd_before = os.getcwd() # see note below
> psb.init(backend)
E RuntimeError: [polyscope] ERROR: Failed to initialize glfw
/opt/conda/envs/test/lib/python3.8/site-packages/polyscope/core.py:12: RuntimeError
Fix on ubuntu
The fix to that is to install glfw
sudo apt-get install libglfw3
Missing display
re-running the command: python -c "import polyscope as ps; ps.init()" throws the following error:
GLFW emitted error: X11: The DISPLAY environment variable is missing
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.8/site-packages/polyscope/core.py", line 12, in init
psb.init(backend)
RuntimeError: [polyscope] ERROR: Failed to initialize glfw
v
Adding a display (to /dev/null)
apt-get install -y xvfb
export DISPLAY=:99.0
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
(credit for this fix to: https://github.com/pyvista/gl-ci-helpers)
OpenGL error
re-running the command: python -c "import polyscope as ps; ps.init()" throws the following error:
[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 3.3 (Core Profile) Mesa 18.3.6
[polyscope] Polyscope OpenGL Error! Type: Invalid enum
GLError() after shader compilation! Program text:
// tag ${ GLSL_VERSION }$
// from rule: GLSL_VERSION
#version 330 core
in vec3 a_position;
out vec2 tCoord;
void main()
{
tCoord = (a_position.xy+vec2(1.0,1.0))/2.0;
gl_Position = vec4(a_position,1.);
}
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.8/site-packages/polyscope/core.py", line 12, in init
psb.init(backend)
RuntimeError: OpenGl error occurred. Text: Invalid enum
[1] + Done(1) Xvfb :99 -screen 0 1024x768x24 1>/dev/null 2>&1
At this point, I've not found a fix yet.
- Langage dominant
- C++
- Étoiles
- 2.2k
- Forks
- 242
- Merge moyen
- 11 min
- PR mergées (30 j)
- 1
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nmwsharp/polyscope
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
-
CurveNetwork - Node radius bug? Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
-
Rust Version Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
Toutes les issues de nmwsharp/polyscope
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Ouverteai_reviewed
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
ydb-platform/ydb#53974 · 3 commentaires ·