配置gem5-gpu docker版

Posted 喝点大麦茶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置gem5-gpu docker版相关的知识,希望对你有一定的参考价值。

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 <[email protected]>

# 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版的主要内容,如果未能解决你的问题,请参考以下文章

[vscode]--HTML代码片段(基础版,reactvuejquery)

gem5-gpu 全系统模拟更改disk和Linux kernel image

window版docker安装及配置

jenkins+docker+docker-compose完整发版流程

GitLab中文社区版Docker镜像安装启动及配置

使用C版YOLOv4在自己的数据集上训练测试