当前位置:网站首页>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边栏推荐
- Batch normalization batch_ normalization
- API for sellers -- description of the return value of adding baby API to Taobao / tmall sellers' stores
- pip安装模块,报错
- [ctfshow web] deserialization
- [machine learning] principle and code of mean shift
- Implementing dropout with mxnet from zero sum
- Stop supporting Huawei! Signing 640billion 5g orders in Germany and 270billion 5g orders in the Middle East is pure nonsense!
- How to connect tdengine with idea database tool?
- What are the popular technologies in 2022?
- 2019普及组总结
猜你喜欢

Current limiting comparison: how to choose sentinel vs hystrix?

Win11 auto delete file setting method

Crazy God redis notes 02

Comparison between dimensional modeling and paradigm modeling

6-19漏洞利用-nsf获取目标密码文件

Thoroughly uncover how epoll realizes IO multiplexing

Establishment of Eureka registration center Eureka server

Take you a minute to learn about symmetric encryption and asymmetric encryption

Stop using xshell and try this more modern terminal connection tool

Redis persistence - detailed analysis of RDB source code | nanny level analysis! The most complete network
随机推荐
Tensor operation in pytoch
About the adjustment of the game background, reading this article is enough
Reuse idea through registry
ASEMI整流桥KBPC3510,KBPC3510封装,KBPC3510应用
大家下午好,请教一个问题:如何从保存点启动一个之前以SQL提交的作业?问题描述:用SQL在cl
[development tutorial 7] crazy shell · open source Bluetooth heart rate waterproof sports Bracelet - capacitive touch
A collection of commonly used shortcut keys for office software
Focus on 5g and AI! Next year, zhanrui will promote 7Nm 5g chips and NPU chips!
[ctfshow web] deserialization
Alibaba cloud Toolkit - project one click deployment tool
[C language classic topic exercise 2]
Pytorch中的tensor操作
2 - configuration and use of routes
使用 Dired 快速移动文件
ASEMI整流桥KBPC2510,KBPC2510参数,KBPC2510规格书
重磅公布!ICML2022奖项:15篇杰出论文,复旦、厦大、上交大研究入选
图的遍历的定义以及深度优先搜索和广度优先搜索(一)
Implementing DDD based on ABP -- aggregation and aggregation root practice
Can TCP and UDP use the same port?
Redis hotspot key and big value