SPEC2006移入docker后的运行问题

实验需要给SPEC2006的benchmark绑定CPUID,于是想到用docker分配CPU资源,写一个简单的DOCKERFILE文件完成配置

1 FROM cmbant/docker-gcc-build
2 MAINTAINER jsbyxyc@me.com
3 
4 COPY cpu2006 /benchmarks/cpu2006
5 WORKDIR /benchmarks/cpu2006
6 CMD ['runspec']

然后运行

docker build -t [image name] .

之后执行

docker run -it --rm --cpuset-cpus=1 spec /bin/bash

进入docker中命令行

执行

source shrc
runspec --noreportable bzip2

出现错误 bad interpreter: No such file or directory

官方论坛中找到解决方法,具体描述如下:

runspec.02 q. Why am I getting messages about specperl: bad interpreter? For example:

bash: /cpu2006newdir/bin/runspec: /cpu2006/bin/specperl: bad interpreter: No such file or directory

a. Did you move the directory where runspec was installed? If so, you can probably put everything to rights, just by going to the new top of the directory tree and typing "bin/relocate".

For example, the following unwise sequence of events is repaired after completion of the final line.

Top of SPEC benchmark tree is '/cpu2006'
Everything looks okay.  cd to /cpu2006,
source the shrc file and have at it!
$ cd /cpu2006
$ . ./shrc
$ cd ..
$ mv cpu2006 cpu2006newdir
$ runspec -h | head
bash: runspec: command not found
$ cd cpu2006newdir/
$ . ./shrc
$ runspec --help | head
bash: /cpu2006newdir/bin/runspec: /cpu2006/bin/specperl: bad interpreter: No such file or directory
$ bin/relocate

运行bin/relocate即可恢复正确路径。

posted @ 2017-07-12 21:58  Big_Shawn  阅读(1194)  评论(0)    收藏  举报