mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 05:21:33 +00:00
Make all commands and copy executables
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
eb67968911
commit
35c6559013
5
Makefile
5
Makefile
@ -43,7 +43,7 @@ CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS))
|
||||
$(info CMD_TARGETS=$(CMD_TARGETS))
|
||||
|
||||
CHECK_TARGETS := assert-fmt vet lint ineffassign misspell
|
||||
MAKE_TARGETS := binary build all check fmt lint-internal test examples cmds coverage generate $(CHECK_TARGETS)
|
||||
MAKE_TARGETS := binaries build all check fmt lint-internal test examples cmds coverage generate $(CHECK_TARGETS)
|
||||
|
||||
TARGETS := $(MAKE_TARGETS) $(EXAMPLE_TARGETS) $(CMD_TARGETS)
|
||||
|
||||
@ -52,8 +52,7 @@ DOCKER_TARGETS := $(patsubst %,docker-%, $(TARGETS))
|
||||
|
||||
GOOS ?= linux
|
||||
|
||||
binary: cmd-nvidia-container-toolkit
|
||||
|
||||
binaries: cmds
|
||||
cmds: $(CMD_TARGETS)
|
||||
$(CMD_TARGETS): cmd-%:
|
||||
GOOS=$(GOOS) go build -ldflags "-s -w" $(MODULE)/cmd/$(*)
|
||||
|
@ -40,8 +40,9 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make binary && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
|
||||
COPY config/config.toml.amzn $DIST_DIR/config.toml
|
||||
|
||||
|
@ -40,8 +40,9 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make binary && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
|
||||
COPY config/config.toml.centos $DIST_DIR/config.toml
|
||||
|
||||
|
@ -48,8 +48,9 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make binary && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
|
||||
COPY config/config.toml.debian $DIST_DIR/config.toml
|
||||
|
||||
|
@ -39,8 +39,9 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make binary && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
|
||||
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
||||
COPY oci-nvidia-hook $DIST_DIR/oci-nvidia-hook
|
||||
|
@ -46,8 +46,9 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make binary && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
|
||||
COPY config/config.toml.ubuntu $DIST_DIR/config.toml
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user