forked from AliyunContainerService/gpushare-device-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (12 loc) · 684 Bytes
/
Dockerfile
File metadata and controls
20 lines (12 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:1.10-stretch as build
WORKDIR /go/src/github.com/AliyunContainerService/gpushare-device-plugin
COPY . .
RUN export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
go build -ldflags="-s -w" -o /go/bin/gpushare-device-plugin-v2 cmd/nvidia/main.go
RUN go build -o /go/bin/kubectl-inspect-gpushare-v2 cmd/inspect/*.go
FROM debian:stretch-slim
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility
COPY --from=build /go/bin/gpushare-device-plugin-v2 /usr/bin/gpushare-device-plugin-v2
COPY --from=build /go/bin/kubectl-inspect-gpushare-v2 /usr/bin/kubectl-inspect-gpushare-v2
CMD ["gpushare-device-plugin-v2","-logtostderr"]