代码拉取完成,页面将自动刷新
#
# Utility Makefile to build/push Docker images
#
# To use an alternate tag invoke as:
#
# make build ALTTAG=<alternate-tag>
#
# Optionally override
#
# DOCKER_EXE=<name of docker executable>
# DOCKER_NAME=<name of user where image will be pushed>
#
# Set this envirnment or command line variable
#
# DOCKER_PASS=<password of uesr where image will be pushed>
#
DOCKER_EXE ?= docker
DOCKER_NAME ?= mitdlh
VERSION := 0.1
USER := mitdlh
REPO := timeloop-accelergy-pytorch
NAME := ${USER}/${REPO}
TAG := $$(git log -1 --pretty=%h)
IMG := ${NAME}:${TAG}
ALTTAG := latest
ALTIMG := ${NAME}:${ALTTAG}
all: build
# Pull all submodules
pull:
git submodule foreach git pull origin master
# Build and tag docker image
build:
"${DOCKER_EXE}" build ${BUILD_FLAGS} \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=${TAG} \
--build-arg BUILD_VERSION=${VERSION} \
-t ${IMG} .
"${DOCKER_EXE}" tag ${IMG} ${ALTIMG}
# Push docker image
push:
@echo "Pushing ${NAME}"
"${DOCKER_EXE}" push ${NAME}
# Lint the Dockerfile
lint:
"${DOCKER_EXE}" run --rm -i hadolint/hadolint < Dockerfile || true
# Login to docker hub
login:
"${DOCKER_EXE}" login --username ${DOCKER_NAME} --password ${DOCKER_PASS}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。