代码拉取完成,页面将自动刷新
COMMIT_ID = $(shell git rev-parse --short HEAD)
GIT_TAG = $(shell git tag --points-at HEAD)
.PHONY: api test lint release
all: test lint api clean
api:
docker build -t phantoscope/api-server:$(COMMIT_ID) .
env:
LOCAL_ADDRESS=$(shell ip a | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'| head -n 1) docker-compose -f docker-compose-test.yml up -d
test:
docker pull psoperator/vgg16-encoder:latest
docker pull psoperator/ssd-detector:latest
PYTHONPATH=$(shell pwd)/search pytest tests --cov=./
lint:
PYTHONPATH=$(shell pwd)/search pylint --rcfile=pylint.conf search --msg-template='{msg_id}:{line:3d},{column}: {obj}: {msg}' --exit-zero > lintoutput
echo $(shell tail -2 lintoutput | grep -P "\d+" -o |sed -n "1p").$(shell tail -2 lintoutput | grep -P "\d+" -o |sed -n "2p")
clean:
rm -rf .pytest_cache
rm -rf lintoutput
ifeq ($(GIT_TAG), )
TAG=$(COMMIT_ID)
else
TAG=$(GIT_TAG)
endif
release:
docker build -t phantoscope/api-server:$(TAG) .
login:
docker login -u phantoscope -p $(DOCKERHUB_TOKEN)
push: login
docker push phantoscope/api-server:$(TAG)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。