码迷,mamicode.com
首页 > 其他好文 > 详细

配置gem5-gpu docker版

时间:2018-04-06 18:40:13      阅读:366      评论:0      收藏:0      [点我收藏+]

标签:pow   exp   usr   .bashrc   ubunt   非root   用户   ash   work   

1 安装docker

2 把非root用户添加到docker组:sudo gpasswd -a UserName docker

3 拉取镜像:docker pull powerjg/gem5-cuda-build,对应文件内容为:

FROM ubuntu:14.04

MAINTAINER Jason Lowe-Power <jason@lowepower.com>

# Install all of gem5‘s dependencies
RUN apt-get update -y && apt-get install -y         build-essential         python-dev         scons         swig         zlib1g-dev         m4         libprotobuf-dev         python-protobuf         protobuf-compiler         libgoogle-perftools-dev
RUN apt-get install --no-install-recommends -y mercurial

# Install dependencies for gem5-gpu (CUDA benchmarks)
RUN apt-get install -y             gcc-4.6             g++-4.6             python             wget

RUN wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
RUN wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/sdk/gpucomputingsdk_3.2.16_linux.run

# Note: May need to make sure return is pressed
RUN bash cudatoolkit_3.2.16_linux_64_ubuntu10.04.run
# Note: must input /usr/local/cuda, then return
RUN bash gpucomputingsdk_3.2.16_linux.run
RUN mv /root/NVIDIA_GPU_Computing_SDK/C /usr/local/cuda

RUN echo "     export CUDAHOME=/usr/local/cuda;     export PATH=$PATH:/usr/local/cuda/bin;     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/lib;     export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/C/lib;     " >> /root/.bashrc
#RUN source /root/.bashrc

WORKDIR /usr/local/cuda/C/common
RUN make 2> /dev/null

# Also needed, but not at this stage in the build
# WORKDIR /gem5-gpu/benchmarks/common
# RUN make

可以看到镜像中配置完成了gem5-gpu所依赖的环境,接下来下载gem5-gpu源文件、编译就可以了。

4

配置gem5-gpu docker版

标签:pow   exp   usr   .bashrc   ubunt   非root   用户   ash   work   

原文地址:https://www.cnblogs.com/chenhuanBlogs/p/8728318.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!