mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 13:35:00 +00:00
Add PREFIX make variable to control command output
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
35c6559013
commit
923344d376
5
Makefile
5
Makefile
@ -53,9 +53,12 @@ DOCKER_TARGETS := $(patsubst %,docker-%, $(TARGETS))
|
|||||||
GOOS ?= linux
|
GOOS ?= linux
|
||||||
|
|
||||||
binaries: cmds
|
binaries: cmds
|
||||||
|
ifneq ($(PREFIX),)
|
||||||
|
cmd-%: COMMAND_BUILD_OPTIONS = -o $(PREFIX)/$(*)
|
||||||
|
endif
|
||||||
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" $(COMMAND_BUILD_OPTIONS) $(MODULE)/cmd/$(*)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GOOS=$(GOOS) go build ./...
|
GOOS=$(GOOS) go build ./...
|
||||||
|
@ -40,9 +40,7 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make cmds && \
|
RUN make PREFIX=${DIST_DIR} 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
|
COPY config/config.toml.amzn $DIST_DIR/config.toml
|
||||||
|
|
||||||
|
@ -40,9 +40,7 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make cmds && \
|
RUN make PREFIX=${DIST_DIR} 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
|
COPY config/config.toml.centos $DIST_DIR/config.toml
|
||||||
|
|
||||||
|
@ -48,9 +48,7 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make cmds && \
|
RUN make PREFIX=${DIST_DIR} 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
|
COPY config/config.toml.debian $DIST_DIR/config.toml
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make cmds && \
|
RUN make PREFIX=${DIST_DIR} 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
|
# 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
|
||||||
|
@ -46,9 +46,7 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make cmds && \
|
RUN make PREFIX=${DIST_DIR} 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
|
COPY config/config.toml.ubuntu $DIST_DIR/config.toml
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user