Take TensorFlow 2.0 as an example Download tf-gpuSelect the tf version you want to download in docker hub ( note that you should select the one with GPU and py3 ) https://hub.docker.com/r/tensorflow/tensorflow/ like:
If the above download times out, you can configure the Tsinghua source.
Build your own image based on the pulled tf-gpu imageThe following dockerfile FROM docker.mirrors.ustc.edu.cn/tensorflow/tensorflow:2.0.3-gpu-py3 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \ pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy pandas sklearn scipy matplotlib seaborn pyyaml h5py hdfs RUN pip install deepctr[gpu] -i http://pypi.douban.com/simple --trusted-host pypi.douban.com RUN pip install keras==2.3.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com # cd /data/wangguisen/ad_ctr # docker build -t tf-deepctr:1.0 -f ./dk/Dockerfile_base . Start the image to check whether the GPU is availabledocker run --gpus '"device=0"' \ --rm -it --name ad_ctr \ -v /data/wangguisen/ad_ctr:/data/ad_ctr \ tf-deepctr:1.0 Enter References: https://blog.csdn.net/weixin_35725559/article/details/112268434 https://zhuanlan.zhihu.com/p/83691871 This is the end of this article about the detailed explanation of how Docker uses GPU. For more information about how Docker uses GPU, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML head tag detailed introduction
>>: Mobile browser Viewport parameters (web front-end design)
What is routing? Routing refers to the activity o...
Root directory and index file The root directive ...
1. Unzip to the location where you want to instal...
Table of contents 1. Create HTML structure 2. Cre...
Port mapping is not the only way to connect Docke...
First, download the installation package from the...
Clicking to switch pictures is very common in lif...
Add an input file HTML control to the web page: &...
Table of contents background CommonsChunkPlugin s...
VC6.0 is indeed too old VC6.0 is a development to...
Recently, when I was writing web pages with PHP, I...
Table of contents 1. Rule 1: Object.Method() 1.1 ...
1. Solution 1.1 Describing the interface context-...
This article shares with you a detailed tutorial ...
Preface In the development of small programs, we ...