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)
This article shares with you the detailed install...
If we want to perform batch operations on a type ...
The code looks like this: .process{ border:1px so...
1. Background A sql-killer process is set up on e...
Native JS implements the click number game for yo...
What is the nobody user in Unix/Linux systems? 1....
MySQL server has gone away issue in PHP 1. Backgr...
In js, set the user to read a certain agreement b...
This article shares the specific code for JavaScr...
Preface Recently I started using robot framework ...
1 Introduction Good coding habits are qualities t...
Table of contents 1. context 1. Usage scenarios 2...
Install ssh tool 1. Open the terminal and type th...
Development Background: Recently, I am working on...
Table of contents 1. What is a doubly linked list...