ensure env var set
This commit is contained in:
@@ -18,6 +18,7 @@ def put_model(
|
|||||||
used as object name."""
|
used as object name."""
|
||||||
assert isinstance(client, Minio)
|
assert isinstance(client, Minio)
|
||||||
assert isinstance(model, Module)
|
assert isinstance(model, Module)
|
||||||
|
assert 'MINIO_BUCKET_NAME' in os.environ
|
||||||
bucket_name = os.getenv('MINIO_BUCKET_NAME')
|
bucket_name = os.getenv('MINIO_BUCKET_NAME')
|
||||||
subfolder = 'models'
|
subfolder = 'models'
|
||||||
# save image to buffer
|
# save image to buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user