当前位置:网站首页>Brief introduction to CUDA image construction
Brief introduction to CUDA image construction
2022-07-26 17:28:00 【Aelous】
Mirror needs
cuda-10.2
python-3.8
Build steps
- base Mirror image
You can find any one grpc Official law of docker Mirror image - cuda install
Install... On the virtual machine cuda It will require manual input of operation instructions , And in the docker You can install it directly through yum, For details, please refer to Nvidia Of [dockerfile](https://gitlab.com/nvidia/container-images/cuda/-/tree/master/dist/10.2/centos7), Be careful repo There are three mirrors in `base`, `run`, `devel`, These three images are sequential dependencies , If you want to be in one dockerfile It's done in , We need to merge Dockerfile
FROM mirrors.****.com/grpc-python-compile\_linux3.1:0.1.7 as base
FROM base as base-amd64
ENV NVARCH x86\_64
ENV NVIDIA\_REQUIRE\_CUDA cuda>=10.2 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441
ENV NV\_CUDA\_CUDART\_VERSION 10.2.89-1
RUN echo -e "[cuda]\nname=cuda\nbaseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86\_64\nenabled=1\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" > /etc/yum.repos.d/cuda.repo
RUN echo -e "[nvidia-ml]\nname=nvidia-ml\nbaseurl=https://developer.download.nvidia.com/compute/machine-learning/repos/rhel7/x86\_64\nenabled=1\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" > /etc/yum.repos.d/nvidia-ml.repo
RUN NVIDIA\_GPGKEY\_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel7/${NVARCH}/7fa2af80.pub | sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
echo "$NVIDIA\_GPGKEY\_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
ENV CUDA\_VERSION 10.2
RUN yum upgrade -y
RUN yum install -y \
cuda-cudart-10-2-${NV\_CUDA\_CUDART\_VERSION} \
cuda-compat-10-2 \
&& ln -s cuda-10.2 /usr/local/cuda \
&& yum clean all \
&& rm -rf /var/cache/yum/\*
# nvidia-docker 1.0
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD\_LIBRARY\_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
# nvidia-container-runtime
ENV NVIDIA\_VISIBLE\_DEVICES all
ENV NVIDIA\_DRIVER\_CAPABILITIES compute,utility
ENV NV\_CUDA\_LIB\_VERSION 10.2.89-1
ENV NV\_NVTX\_VERSION 10.2.89-1
ENV NV\_LIBNPP\_VERSION 10.2.89-1
ENV NV\_LIBCUBLAS\_PACKAGE\_NAME libcublas10
ENV NV\_LIBCUBLAS\_VERSION 10.2.2.89-1
ENV NV\_LIBCUBLAS\_PACKAGE ${NV\_LIBCUBLAS\_PACKAGE\_NAME}-${NV\_LIBCUBLAS\_VERSION}
ENV NV\_LIBNCCL\_PACKAGE\_NAME libnccl
ENV NV\_LIBNCCL\_PACKAGE\_VERSION 2.11.4-1
ENV NCCL\_VERSION 2.11.4
ENV NV\_LIBNCCL\_PACKAGE ${NV\_LIBNCCL\_PACKAGE\_NAME}-${NV\_LIBNCCL\_PACKAGE\_VERSION}+cuda10.2
RUN yum install -y \
cuda-libraries-10-2-${NV\_CUDA\_LIB\_VERSION} \
cuda-nvtx-10-2-${NV\_NVTX\_VERSION} \
cuda-npp-10-2-${NV\_LIBNPP\_VERSION} \
${NV\_LIBCUBLAS\_PACKAGE} \
${NV\_LIBNCCL\_PACKAGE}
ENV NV\_CUDA\_LIB\_VERSION 10.2.89-1
ENV NV\_NVPROF\_VERSION 10.2.89-1
ENV NV\_CUDA\_CUDART\_DEV\_VERSION 10.2.89-1
ENV NV\_NVML\_DEV\_VERSION 10.2.89-1
ENV NV\_LIBNPP\_DEV\_VERSION 10.2.89-1
ENV NV\_LIBCUBLAS\_DEV\_PACKAGE\_NAME libcublas-devel
ENV NV\_LIBCUBLAS\_DEV\_VERSION 10.2.2.89-1
ENV NV\_LIBCUBLAS\_DEV\_PACKAGE ${NV\_LIBCUBLAS\_DEV\_PACKAGE\_NAME}-${NV\_LIBCUBLAS\_DEV\_VERSION}
ENV NV\_LIBNCCL\_DEV\_PACKAGE\_NAME libnccl-devel
ENV NV\_LIBNCCL\_DEV\_PACKAGE\_VERSION 2.11.4-1
ENV NCCL\_VERSION 2.11.4
ENV NV\_LIBNCCL\_DEV\_PACKAGE ${NV\_LIBNCCL\_DEV\_PACKAGE\_NAME}-${NV\_LIBNCCL\_DEV\_PACKAGE\_VERSION}+cuda10.2
RUN yum install -y \
make \
cuda-nvml-dev-10-2-${NV\_NVML\_DEV\_VERSION} \
cuda-command-line-tools-10-2-${NV\_CUDA\_LIB\_VERSION} \
cuda-cudart-dev-10-2-${NV\_CUDA\_CUDART\_DEV\_VERSION} \
cuda-libraries-dev-10-2-${NV\_CUDA\_LIB\_VERSION} \
cuda-minimal-build-10-2-${NV\_CUDA\_LIB\_VERSION} \
cuda-nvprof-10-2-${NV\_NVPROF\_VERSION} \
cuda-npp-dev-10-2-${NV\_LIBNPP\_DEV\_VERSION} \
${NV\_LIBCUBLAS\_DEV\_PACKAGE} \
${NV\_LIBNCCL\_DEV\_PACKAGE} \
&& yum clean all \
&& rm -rf /var/cache/yum/\*
#RUN Execute the following command
RUN yum install -y wget && yum clean all
#WORKDIR amount to cd
WORKDIR /usr/local/app边栏推荐
- Use replace regexp to add a sequence number at the beginning of a line
- Methods of path related comments (I)
- 办公软件常用快捷键大全
- SCCM tips - improve the download speed of drivers and shorten the deployment time of the system when deploying the system
- How does win11 automatically clean the recycle bin?
- [development tutorial 7] crazy shell · open source Bluetooth heart rate waterproof sports Bracelet - capacitive touch
- (25)Blender源码分析之顶层菜单Blender菜单
- Implement softmax classification from zero sum using mxnet
- Avalanche subnets vs. polygon supernets of application chain
- 03 | implement usereducer and usestate
猜你喜欢

带你一分钟了解对称加密和非对称加密

After Oracle creates a table partition, the partition is not given during the query, but the value specified for the partition field will be automatically queried according to the partition?

Thoroughly uncover how epoll realizes IO multiplexing

Comparison between dimensional modeling and paradigm modeling

Eureka Registry - from entry to application

About the difference between BigDecimal conversion string toengineeringstring, toplainstring and toString
![Leetcode:1206. design jump table [jump table board]](/img/4f/2b6df8e2151b8bce70c8227c69d8bc.png)
Leetcode:1206. design jump table [jump table board]

ASEMI整流桥KBPC2510,KBPC2510参数,KBPC2510规格书
![37. [categories of overloaded operators]](/img/67/b821270079589c53b9c38b0ca033ac.png)
37. [categories of overloaded operators]

Stop using xshell and try this more modern terminal connection tool
随机推荐
the loss outweighs the gain! Doctors cheated 2.1 million yuan and masters cheated 30000 yuan of talent subsidies, all of which were sentenced!
Shrimp Shope get commodity details according to ID API return value description
03|实现 useReducer 和 useState
#夏日挑战赛# OpenHarmony基于JS实现的贪吃蛇
Comparison between agile development and Devops
(25)Blender源码分析之顶层菜单Blender菜单
After Oracle creates a table partition, the partition is not given during the query, but the value specified for the partition field will be automatically queried according to the partition?
Implementing DDD based on ABP -- aggregation and aggregation root practice
MySQL foundation - basic database operation
What is a test case? How to design?
pip安装模块,报错
Leetcode:1206. design jump table [jump table board]
[ctfshow web] deserialization
图解用户登录验证流程,写得太好了!
使用 Dired 快速移动文件
Stop supporting Huawei! Signing 640billion 5g orders in Germany and 270billion 5g orders in the Middle East is pure nonsense!
[Luogu p8063] shortest paths (graph theory)
How does win11 automatically clean the recycle bin?
Data preprocessing of machine learning
Add 5g and AI, oppo announced to invest 10billion R & D funds next year!