ci: cache detection/model
This commit is contained in:
parent
30526ade16
commit
023670a2ed
@ -9,6 +9,7 @@ cache:
|
|||||||
- opencv/src
|
- opencv/src
|
||||||
- opencv/contrib
|
- opencv/contrib
|
||||||
- emtest/target
|
- emtest/target
|
||||||
|
- detection/model
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test-and-build
|
stage: test-and-build
|
||||||
|
|||||||
@ -245,4 +245,5 @@ def parse_args():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
print("starting detection server on %s:%d" % (args.host, args.port))
|
||||||
app.run(host=args.host, port=args.port, debug=True)
|
app.run(host=args.host, port=args.port, debug=True)
|
||||||
|
|||||||
@ -7,7 +7,9 @@ def get_model(name):
|
|||||||
if os.path.exists(fn):
|
if os.path.exists(fn):
|
||||||
return fn
|
return fn
|
||||||
with open(fn + ".tmp", 'wb') as tf:
|
with open(fn + ".tmp", 'wb') as tf:
|
||||||
|
print(f"Downloading {name}...")
|
||||||
tf.write(oss_get(name, "emblem-models"))
|
tf.write(oss_get(name, "emblem-models"))
|
||||||
|
print(f"Downloaded {name}")
|
||||||
os.rename(fn + ".tmp", fn)
|
os.rename(fn + ".tmp", fn)
|
||||||
return fn
|
return fn
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user