如何从Ubuntu:16.04在docker上安装v-rep?

问题描述 投票:0回答:1

[我正在尝试在具有Ubuntu 16.04的Docker容器上安装v-rep。

这是我的Dockerfile

FROM ubuntu:16.04

RUN apt-get update && apt-get -y install \
      curl \
      sudo

# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
    mkdir -p /home/developer && \
    echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
    echo "developer:x:${uid}:" >> /etc/group && \
    echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
    chmod 0440 /etc/sudoers.d/developer && \
    chown ${uid}:${gid} -R /home/developer

USER developer
ENV HOME /home/developer

RUN cd /home/developer && \
    curl http://coppeliarobotics.com/files/V-REP_PRO_EDU_V3_5_0_Linux.tar.gz --output vrep.tar.gz && \
    tar -xzf vrep.tar.gz && \
    rm vrep.tar.gz

我使用容器运行

docker run -ti --rm \
       -e DISPLAY=$DISPLAY \
       -v /tmp/.X11-unix:/tmp/.X11-unix \
       gvgramazio/vrep:latest

为了显示。然后,如果我使用./vrep.sh运行v-rep,则会出现缺少相关性的错误。我用

检查依赖项
./libLoadErrorCheck.sh

这是结果:

linux-vdso.so.1 =>  (0x00007ffec5dd8000)
liblua5.1.so (0x00007f2f5ac3c000)
libqscintilla2.so.9 (0x00007f2f5967b000)
libQt5OpenGL.so.5 (0x00007f2f59424000)
libQt5Widgets.so.5 (0x00007f2f58bf3000)
libQt5Gui.so.5 (0x00007f2f58446000)
libQt5SerialPort.so.5 (0x00007f2f5822d000)
libQt5Network.so.5 (0x00007f2f57e9c000)
libQt5Core.so.5 (0x00007f2f57764000)
libGL.so.1 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2f57547000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2f571c5000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2f56ebc000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2f56ca6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f568dc000)
libQt5PrintSupport.so.5 (0x00007f2f5666e000)
libGL.so.1 => not found
libGL.so.1 => not found
libGL.so.1 => not found
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2f56454000)
libicui18n.so.56 (0x00007f2f55fbb000)
libicuuc.so.56 (0x00007f2f55c03000)
libicudata.so.56 (0x00007f2f54220000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2f54018000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2f53e14000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2f5ab42000)
libgthread-2.0.so.0 => not found
libglib-2.0.so.0 => not found
libGL.so.1 => not found

似乎我只有三个库:

  • libgthread-2.0.so.0
  • libglib-2.0.so.0
  • libGL.so.1

我用]安装了库>

apt-get -y install libgl1-mesa-glx libglib2.0-0 

但是在尝试启动vrep时出现此错误。

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./vrep.sh: line 33:   524 Aborted                 (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"

我想念的是什么?


我在github repository上发现以下依赖项:

  • Lua5.1
  • Boost C ++库
  • QScintilla2
  • Qt5.9或更高版本
  • 所以我已经将docker文件更新为:

FROM ubuntu:16.04

RUN apt-get update && apt-get -y install \
      curl \
      build-essential \
      qtcreator \
      qt5-default \
      sudo

# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
    mkdir -p /home/developer && \
    echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
    echo "developer:x:${uid}:" >> /etc/group && \
    echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
    chmod 0440 /etc/sudoers.d/developer && \
    chown ${uid}:${gid} -R /home/developer

USER developer
ENV HOME /home/developer

RUN cd /home/developer && \
    curl http://coppeliarobotics.com/files/V-REP_PRO_EDU_V3_5_0_Linux.tar.gz --output vrep.tar.gz && \
    tar -xzf vrep.tar.gz && \
    rm vrep.tar.gz

好消息是现在它可以在我的系统上运行,坏消息是它仍然不能在我的docker容器上运行。这是尝试运行./vrep.sh

时出现的错误
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-developer'
Using the default Lua library.
Loaded the video compression library.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(SingleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
Falling back to using screens root_visual.
Add-on script 'vrepAddOnScript-addOnScriptDemo.lua' was loaded.
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize 0, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(SingleBuffer), swapInterval -1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
Falling back to using screens root_visual.
Could not initialize GLX
./vrep.sh: line 33:    16 Aborted                 (core dumped) "$dirname/$appname" "${PARAMETERS[@]}"

我已经采取了与Fabio Rehm's Blog中的容器共享x11套接字的想法,并且可以在firefox上正常工作,但是v-rep似乎有问题。所以现在我将尝试其他方法。

我正在尝试在具有Ubuntu 16.04的Docker容器上安装v-rep。这是我的Dockerfile:FROM ubuntu:16.04 RUN apt-get update && apt-get -y install \ curl \ sudo#...

docker installation dockerfile x11 x11-forwarding
1个回答
-1
投票

您终于让docker的vrep工作了吗?我也在同样的情况下,想知道您是否找到了解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.