1 Star 0 Fork 0

小应子/k8s-device-plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
FROM nvidia/cuda:9.0-base-ubuntu16.04 as build
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
ca-certificates \
wget \
cuda-cudart-dev-9-0 \
cuda-misc-headers-9-0 \
cuda-nvml-dev-9-0 && \
rm -rf /var/lib/apt/lists/*
ENV GOLANG_VERSION 1.9.2
RUN wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
| tar -C /usr/local -xz
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ENV CGO_CFLAGS "-I /usr/local/cuda-9.0/include"
ENV CGO_LDFLAGS "-L /usr/local/cuda-9.0/lib64"
ENV PATH=$PATH:/usr/local/nvidia/bin:/usr/local/cuda/bin
WORKDIR /go/src/nvidia-device-plugin
COPY . .
RUN go install -ldflags="-s -w" -v nvidia-device-plugin
FROM debian:stretch-slim
WORKDIR /work
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility,compute
COPY --from=build /go/bin/nvidia-device-plugin /usr/bin/nvidia-device-plugin
COPY --from=build /go/src/nvidia-device-plugin/nvidia.json /work/nvidia.json
COPY --from=build /go/src/nvidia-device-plugin/copy.sh /work/copy.sh
CMD ["nvidia-device-plugin"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wukaiying01/k8s-device-plugin.git
git@gitee.com:wukaiying01/k8s-device-plugin.git
wukaiying01
k8s-device-plugin
k8s-device-plugin
nvidiak8s/v1.9

搜索帮助

0d507c66 1850385 C8b1a773 1850385