docker with GPU support
自己总结的:
nvidia-docker, 不支持windows,
2019.10, nvidia-docker过时了,从docker 1903开始,安装一个nvidia-container-runtime就行了, --gpus
2020.12, docker 好像可以直接在wsl2里面跑了, 需要windows inside版本
win 10 2021版本直接包含了对GPU的支持,不再需要inside版本
copy from SO:
2021 updated answer
If you need to access NVIDIA CUDA from a Linux container on Windows 10, there is an easy way to do so, if you are fine with the (current) requirement of being on an Insider build. I was successful with training models on GPU in TensorFlow 2 using this method.
- Update Windows 10 to build 20149 or higher. At the time of writing, only Insider Dev branch will work -- you can check the build numbers on the Windows Insider webpage.
- Install the NVIDIA CUDA WSL driver (free registration is required)
- Install Docker Desktop
- It will guide you through enabling WSL2 if you haven't already.
- If you already have it installed, update it to the latest version and enable
Settings - General - Use the WSL2 backed engine. - To be able to use the
dockerCLI from inside WSL2 (not just from PowerShell/cmd), enable the integration inSettings - Resources - WSL INTEGRATION.
- Test using the command
docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody
You need to pass --gpus=all to docker run to enable the container to access GPU. (If you use VSCode Remote Containers, add "runArgs": ["--gpus=all"], to devcontainer.json.)
You may come across mentions of --runtime=nvidia in descriptions of images meant for nvidia-docker (like the official TensorFlow images). Simply replace --runtime=nvidia by --gpus=all in the provided commands.
Ref:
https://stackoverflow.com/questions/49589229/is-gpu-pass-through-possible-with-docker-for-windows (https://www.docker.com/blog/wsl-2-gpu-support-is-here/)
https://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container
Is GPU pass-through possible with docker for Windows?
docker with GPU support的更多相关文章
- Ubuntu 16.04 + CUDA 8.0 + cuDNN v5.1 + TensorFlow(GPU support)安装配置详解
随着图像识别和深度学习领域的迅猛发展,GPU时代即将来临.由于GPU处理深度学习算法的高效性,使得配置一台搭载有GPU的服务器变得尤为必要. 本文主要介绍在Ubuntu 16.04环境下如何配置Ten ...
- 谈谈TensorFlow with CPU support or TensorFlow with GPU support(图文详解)
不多说,直接上干货! You must choose one of the following types of TensorFlow to install: TensorFlow with CPU ...
- detectron2安装出现Kernel not compiled with GPU support 报错信息
在安装使用detectron2的时候碰到Kernel not compiled with GPU support 问题,前后拖了好久都没解决,现总结一下以备以后查阅. 不想看心路历程的可以直接跳到最后 ...
- PatentTips - GPU Support for Blending
Graphics processing units (GPUs) are specialized hardware units used to render 2-dimensional (2-D) a ...
- docker使用GPU
1.物理机安装显卡驱动 2.安装nvidia-docker wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download ...
- tensorflow 资源汇总-docker 运行 tensorflow-gpu on nvidia support
tensorflow 容器运行过程中使用到的命令记录: 使用image启动容器命令: docker run --name=: tensorflow/tensorflow:latest-gpu-py3- ...
- 巧用 Docker 快速部署 GPU 环境
公众号关注 「开源Linux」 回复「学习」,有我为您特别筛选的学习资料~ 在 Linux 服务器上使用 GPU 跑深度学习的模型很正常不过.如果我们想用 Docker 实现同样的需求,就需要做些额外 ...
- 【Docker】使用Docker Client和Docker Go SDK为容器分配GPU资源
目录 背景 使用 Docker Client 调用 GPU 依赖安装 安装 Docker 安装 NVIDIA Container Toolkit¶ --gpus 用法 使用 Docker Go SDK ...
- caffe 无GPU 环境搭建
root@k-Lenovo:/home/k# sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-d ...
- docker[caffe&&pycaffe]
0 引言 今天花了一天,完成了整个caffe的dockerfile编写,其支持python3.6.6,这里主要的注意点是protobuf的版本(在3.6.0之后,只支持c11),还有在制作镜像的时候注 ...
随机推荐
- 做独立开发者,能在 AppStore 赚到多少钱?
成为一名独立开发者,不用朝九晚五的上班,开发自己感兴趣的产品,在AppStore里赚美金,这可能是很多程序员的梦想,今天就来盘一盘,这个梦想实现的概率有多少. (Solo社区 投稿) 先来了解一些数据 ...
- windows服务开发demo
0.写在前面 windows7开始,windows服务运行在session 0, 用户程序都运行在session x (x >= 1) 而session之间是有隔离的,实践发现是无法在服务中直接 ...
- redis基本数据结构-集合set
redis基本数据结构-集合set 特性 一个集合键最多存储 2^32 - 1 个字符串值 元素在集合内无序(哈希表-链地址法解决冲突) 元素在集合内唯一 向集合添加元素 sadd key value ...
- SparkSQL on K8s 在网易传媒的落地实践
作者:鲁成祥 易顺 随着云原生技术的发展和成熟,大数据基础设施积极拥抱云原生是业内发展的一大趋势.网易传媒在 2021 年成功将 SparkSQL 部署到了 K8s 集群,并实现与部分在线业务的混合部 ...
- 使用C#/.NET解析Wiki百科数据实现获取历史上的今天
创建一个webapi项目做测试使用. 创建新控制器,搭建一个基础框架,包括获取当天日期.wiki的请求地址等 创建一个Http请求帮助类以及方法,用于获取指定URL的信息 使用http请求访问 ...
- Scrapy模块入门与实战:笔趣阁小说网爬取
scrapy框架基本使用 创建项目(爬取笔趣阁小说网) scrapy startproject novels 创建spider cd novels scrapy genspider bqgui.cc ...
- Java--普通方法重载
[转载自本科老师上课课件] 调用一个重载过的方法时,Java编译程序是如何确定究竟应该调用哪一个方法?以下代码定义了三个重载方法: public void f(char ch){ System.out ...
- 【BatchProgram】工作用的小工具 - 自动访问常用页面
需求: 我需要打开很多页面,但是忘了收藏的话,每次都要重新去找一遍打开 页面很多,不是一两个了,为什么这么多?因为开发情况就是这样啊: 正式生产一个页面,UAT测试一个页面,本地调试一个页面 每日工作 ...
- 【ECharts】01 快速上手
简单介绍: ECharts 是一个使用 JavaScript 实现的开源可视化库,涵盖各行业图表,满足各种需求. ECharts 遵循 Apache-2.0 开源协议,免费商用. ECharts 兼容 ...
- 计算机领域:学术写作中的conducive的含义表示
"Conducive" 的意思是"有助于"或"有益于".在学术和正式的写作中,"conducive" 常用于描述某种情况 ...