要在群集上进行部署,我正在将一个名为leverjs的学术软件包装在Singularity容器中。它带有可从该软件运行的预构建Matlab软件包。我已经通过配方文件在容器内部安装了Matlab运行时R2017b,leadjs和所有依赖项。
Leverjs转换并分析原始路径上的图像文件,该路径会自动绑定到奇点容器。
但是在从容器中运行杠杆js并调用预编译的matlab代码时,Matlab崩溃并导致分段违规。 Leverjs本身依靠电子运行。 如果所有依赖项和Matlab运行时都在容器中,Matlab如何引起段错误?
配方文件: 引导程序:泊坞窗 来自:ubuntu
%setup
hostname -f > $SINGULARITY_ROOTFS/etc/build_host
# or #wget http://ssd.mathworks.com/supportfiles/downloads/R2017b/deployment_files/R2017b/installers/glnxa64/MCR_R2017b_glnxa64_installer.zip and unzip to location
#mkdir matlab
#unzip MCR_R2017b_glnxa64_installer.zip -d matlab
cp -R /home/cewa/Downloads/matlab ${SINGULARITY_ROOTFS}/matlab
%post
apt-get update
apt-get -y upgrade
apt-get -y install git \
nodejs \
npm \
wget \
libgtk-3-dev \
libxss1 \
libgconf2-4 \
libnss3 \
libasound2-dev
# install git lfs
wget https://github.com/git-lfs/git-lfs/releases/download/v2.5.2/git-lfs-linux-amd64-v2.5.2.tar.gz
mkdir git-lfs
tar -C git-lfs -xf git-lfs-linux-amd64-v2.5.2.tar.gz
cd git-lfs
./install.sh
git lfs install
#install matlab dependency
cd ..
cd matlab
./install -mode silent -agreeToLicense yes
mkdir -p /opt/local
cd /opt/local
git clone --depth=1 https://git-bioimage.coe.drexel.edu/opensource/leverjs.git
git clone --depth=1 https://git-bioimage.coe.drexel.edu/opensource/leverUtilities.git
cd leverjs
npm update
npm run postinstall
chmod +x -R prebuilt/
## change path in CmdLoop.js to correct matlab path
cd leverjs
sed -i 's@/usr/local/MATLAB/R2017b/@/usr/local/MATLAB/MATLAB_Runtime/v93@' CmdLoop.js
##add cleanup
echo $PWD
cd /
echo $PWD
rm -rf git-lfs-linux-amd64-v2.5.2.tar.gz
rm -rf git-lfs
rm -rf matlab
apt clean
apt autoclean
apt autoremove
%runscript
cd /opt/local/leverjs
npm start
%apprun leverjs
cd /opt/local/leverjs
exec npm start
%apprun leverjs-server
exec node server.js --port=3000 "$@"
matlab故障转储:
------------------------------------------------------------------------
Segmentation violation detected at Thu Sep 20 15:29:40 2018
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : US-ASCII
GNU C Library : 2.27 stable
Host Name : X8DA3
MATLAB Architecture : glnxa64
MATLAB Root : /usr/local/MATLAB/MATLAB_Runtime/v93
MATLAB Version : 9.3.0.713579 (R2017b)
Operating System : Linux 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64
Processor ID : x86 Family 6 Model 26 Stepping 5, GenuineIntel
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000000 RBX = 00007ffc5c5a6a30
RCX = 0000000000000000 RDX = 0000000000000001
RSP = 00007ffc5c5a6990 RBP = 00007ffc5c5a69b0
RSI = 00000000000000d8 RDI = 00007ffc5c5a6a48
R8 = 00007ffc5c5a6bf0 R9 = 0000000000000001
R10 = 0000000000000004 R11 = 00007fdcbf45c070
R12 = 0000000000000001 R13 = 0000000003905600
R14 = 00007ffc5c5a6a48 R15 = 00007ffc5c5a6a30
RIP = 00007fdcb6e64c9e EFL = 0000000000010206
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fdcb6e64c9e bin/glnxa64/libmwfoundation_usm.so+00056478 _ZN10foundation3usm10management10thisthread16ContextActivatorC1INS0_5scope3MvmEEERNS1_7ContextIT_EE+00000014
[ 1] 0x00007fdcb5795c36 bin/glnxa64/libmwmcr.so+00457782
[ 2] 0x00007fdcb57cc0df bin/glnxa64/libmwmcr.so+00680159 _ZN11mcrInstance27feval_on_interpreter_threadEPKciPP11mxArray_tagiS4_+00000063
[ 3] 0x00007fdcb57d0051 bin/glnxa64/libmwmcr.so+00696401 _ZN11mcrInstance18CallMATLABFunctionEPKciPP11mxArray_tagiS4_PNSt15__exception_ptr13exception_ptrE+00000129
[ 4] 0x00007fdcb57d0293 bin/glnxa64/libmwmcr.so+00696979 _ZN11mcrInstance10EvalStringERKSbIDsSt11cha
7b5788 bin/glnxa64/libmwmcr.so+00587656
[ 20] 0x00007fdcb57b5a93 bin/glnxa64/libmwmcr.so+00588435 _Z12mcr_run_mainRKN5boost9function0IiEEbb+00000243
[ 21] 0x00007fdca3b135a8 bin/glnxa64/libmwMVMLocal.so+00427432
[ 22] 0x00007fdcb546e38d bin/glnxa64/libmwmvm.so+02507661
[ 23] 0x00007fdcb5a926bd bin/glnxa64/libmwmclbase.so+00386749 mclRunMain+00000989
[ 24] 0x00007fdca478bf02 bin/glnxa64/libmwmclmcr.so+02191106 mclStandaloneGenericMain+00001074
[ 25] 0x00007fdcbff84bd2 bin/glnxa64/libmwlaunchermain.so+00048082
[ 26] 0x0000000000408b06 /opt/local/leverjs/prebuilt/matlabPollDB+00035590
[ 27] 0x00007fdcbf3e6b97 /lib/x86_64-linux-gnu/libc.so.6+00138135 __libc_start_main+00000231
[ 28] 0x0000000000404544 /opt/local/leverjs/prebuilt/matlabPollDB+00017732
[ 29] 0x0000000000000000 <unknown-module>+00000000
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.
我希望这不是太过分的话题。
谢谢。
答案 0 :(得分:0)
leverjs是用于可视化的软件, 您需要在OpenGL库支持下运行奇点。添加-nv 选项
用于%runscript 部分
$ singularity run --nv --nv image_test.simg
%apprun
$ singularity run --nv --app leverjs-server image_test.simg [args]
$ singularity run --nv --app leverjs image_test.simg
现在,如果您对此技术有疑问,则可以从包含GL standard libraries no vendor的docker映像进行引导,并将其添加到选项--nv
首先尝试一下,如果仍然无法解决问题,对于具有奇点功能的容器来说,问题不再是轻微的,您应该提供有关使用哪些命令来运行容器的更多详细信息。
崩溃转储中的这一行也是
崩溃解码:已禁用-没有沙箱或构建区域路径
表示Matlab找不到源文件。