Coder Social home page Coder Social logo

metashape-in-a-docker-container's Introduction

Metashape in a Docker Container

An attempt to get Metashape running in a container.

Metashape being software for doing photogrammetry.

This is a non-working attempt of getting a Linux version of Metashape running in a Docker container. This was tested on a Mac and your mileage will vary.

Prerequistics

Docker, Xquartz and Make.

Xquartz

Start Xquartz and make the following changes, i.e. allow network interaction with X11.

First time through, open XQuartz, goto preferences > Security and check the option to allow connections from network clients, quit XQuartz.

Enable indirect OpenGL rendering in Xquartz, from here:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

You might need to do that - depends on the Xquartz version. I was using XQuartz 2.8.0_rc4 (xorg-server 1.19.7).

Restart Xquartz

In the terminal window that opens with Xquartz, type xhost + <-- allow all hosts to connect. WARNING: this is a security issue since it allows everyone and their dog to connect to your running X display.

So don't forget to switch of Xquartz after you have finished.

Running & Failing

Tested with Xquartz 2.8.0, MacOS 10.13.6 and Metashape 1.7.2

To build and run the container:

make run

That will attempt to start metashape but crashes (for me at least) with the following error:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QOpenGLWidget: Failed to make context current
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
Could not link shader program:
 ""
Segmentation fault

Underlying issue does seem to be the shader.

Diagnosis

Runnning the diagnosis image can perhaps help:

make run-diagnosis

Doing running glxgears in that container will in fact show the gears however running strace glxgears will actually show the gears turning! Very strange.

Running glxinfo -B shows:

name of display: host.docker.internal:0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
display: host.docker.internal:0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
OpenGL vendor string: Intel Inc.
OpenGL renderer string: Intel Iris Pro OpenGL Engine
OpenGL version string: 1.4 (2.1 INTEL-10.36.19)

I read somewhere that shaders are supported with OpenGL v2 and since my version is 1.4 - no shaders. But no idea.

metashape-in-a-docker-container's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

hong-brother

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.