nvidia-docker - cuda_runtime 在构建容器时可用吗?
nvidia-docker - can cuda_runtime be available while building a container?
在 docker 容器的构建命令中尝试编译 darknet 时,我经常 运行 进入异常 include/darknet.h:11:30: fatal error: cuda_runtime.h: No such file or directory
.
我正在按照此处的说明构建容器:https://github.com/NVIDIA/nvidia-docker/wiki/Deploy-on-Amazon-EC2。我有一个简单的 Dockerfile
我正在测试 - 相关部分:
FROM nvidia/cuda:9.2-runtime-ubuntu16.04
...
WORKDIR /
RUN apt-get install -y git
RUN git clone https://github.com/pjreddie/darknet.git
WORKDIR /darknet
# Set OpenCV makefile flag
RUN sed -i '/OPENCV=0/c\OPENCV=1' Makefile
RUN sed -i '/GPU=0/c\GPU=1' Makefile
#RUN ln -s /usr/local/cuda-9.2 /usr/local/cuda
# HERE I have been playing with commands to show me the state of the docker image to try to troubleshoot the problem
RUN find / -name "cuda_runtime.h"
RUN ls /usr/local/cuda/lib64/
RUN less /usr/local/cuda/README
RUN make
当 运行 构建一个容器时,我看到的大部分文档都使用了 nvidia 库,但是当使用 gpu
支持构建时,暗网的编译方式不同,所以我需要 cuda_runtime.h
构建时间。
也许我误解了 nvidia-docker
在做什么 - 我假设 nvidia-docker
存在是因为 Nvidia 代码必须安装在实际的主机上而不是在容器内 & 他们使用某种机制与容器共享 "native" 代码以便管理 GPU - 对吗?
我是应该在构建我的容器时尝试构建 darknet
还是我应该将它安装在主机上,然后以某种方式使其对容器可用?这似乎违背了容器的可移植性,但我可以忍受一些限制来访问 GPU。
FROM nvidia/cuda:9.2-runtime-ubuntu16.04
您的图像只有 运行 CUDA 应用程序所需的 CUDA-9.2 的点点滴滴,但没有 所需的点点滴滴建造个。
您需要使用 -devel 变体。
在 docker 容器的构建命令中尝试编译 darknet 时,我经常 运行 进入异常 include/darknet.h:11:30: fatal error: cuda_runtime.h: No such file or directory
.
我正在按照此处的说明构建容器:https://github.com/NVIDIA/nvidia-docker/wiki/Deploy-on-Amazon-EC2。我有一个简单的 Dockerfile
我正在测试 - 相关部分:
FROM nvidia/cuda:9.2-runtime-ubuntu16.04
...
WORKDIR /
RUN apt-get install -y git
RUN git clone https://github.com/pjreddie/darknet.git
WORKDIR /darknet
# Set OpenCV makefile flag
RUN sed -i '/OPENCV=0/c\OPENCV=1' Makefile
RUN sed -i '/GPU=0/c\GPU=1' Makefile
#RUN ln -s /usr/local/cuda-9.2 /usr/local/cuda
# HERE I have been playing with commands to show me the state of the docker image to try to troubleshoot the problem
RUN find / -name "cuda_runtime.h"
RUN ls /usr/local/cuda/lib64/
RUN less /usr/local/cuda/README
RUN make
当 运行 构建一个容器时,我看到的大部分文档都使用了 nvidia 库,但是当使用 gpu
支持构建时,暗网的编译方式不同,所以我需要 cuda_runtime.h
构建时间。
也许我误解了 nvidia-docker
在做什么 - 我假设 nvidia-docker
存在是因为 Nvidia 代码必须安装在实际的主机上而不是在容器内 & 他们使用某种机制与容器共享 "native" 代码以便管理 GPU - 对吗?
我是应该在构建我的容器时尝试构建 darknet
还是我应该将它安装在主机上,然后以某种方式使其对容器可用?这似乎违背了容器的可移植性,但我可以忍受一些限制来访问 GPU。
FROM nvidia/cuda:9.2-runtime-ubuntu16.04
您的图像只有 运行 CUDA 应用程序所需的 CUDA-9.2 的点点滴滴,但没有 所需的点点滴滴建造个。
您需要使用 -devel 变体。