Make all commands and copy executables

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2021-09-06 13:41:57 +02:00
parent eb67968911
commit 35c6559013
6 changed files with 17 additions and 13 deletions

View File

@ -43,7 +43,7 @@ CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS))
$(info CMD_TARGETS=$(CMD_TARGETS)) $(info CMD_TARGETS=$(CMD_TARGETS))
CHECK_TARGETS := assert-fmt vet lint ineffassign misspell 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) TARGETS := $(MAKE_TARGETS) $(EXAMPLE_TARGETS) $(CMD_TARGETS)
@ -52,8 +52,7 @@ DOCKER_TARGETS := $(patsubst %,docker-%, $(TARGETS))
GOOS ?= linux GOOS ?= linux
binary: cmd-nvidia-container-toolkit binaries: cmds
cmds: $(CMD_TARGETS) cmds: $(CMD_TARGETS)
$(CMD_TARGETS): cmd-%: $(CMD_TARGETS): cmd-%:
GOOS=$(GOOS) go build -ldflags "-s -w" $(MODULE)/cmd/$(*) GOOS=$(GOOS) go build -ldflags "-s -w" $(MODULE)/cmd/$(*)

View File

@ -40,8 +40,9 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $GOPATH/src/nvidia-container-toolkit WORKDIR $GOPATH/src/nvidia-container-toolkit
COPY . . COPY . .
RUN make binary && \ RUN make cmds && \
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit 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 COPY config/config.toml.amzn $DIST_DIR/config.toml

View File

@ -40,8 +40,9 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $GOPATH/src/nvidia-container-toolkit WORKDIR $GOPATH/src/nvidia-container-toolkit
COPY . . COPY . .
RUN make binary && \ RUN make cmds && \
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit 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 COPY config/config.toml.centos $DIST_DIR/config.toml

View File

@ -48,8 +48,9 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $GOPATH/src/nvidia-container-toolkit WORKDIR $GOPATH/src/nvidia-container-toolkit
COPY . . COPY . .
RUN make binary && \ RUN make cmds && \
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit 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 COPY config/config.toml.debian $DIST_DIR/config.toml

View File

@ -39,8 +39,9 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $GOPATH/src/nvidia-container-toolkit WORKDIR $GOPATH/src/nvidia-container-toolkit
COPY . . COPY . .
RUN make binary && \ RUN make cmds && \
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit 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 # 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 COPY oci-nvidia-hook $DIST_DIR/oci-nvidia-hook

View File

@ -46,8 +46,9 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $GOPATH/src/nvidia-container-toolkit WORKDIR $GOPATH/src/nvidia-container-toolkit
COPY . . COPY . .
RUN make binary && \ RUN make cmds && \
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit 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 COPY config/config.toml.ubuntu $DIST_DIR/config.toml