image_through_model #49

Merged
brian merged 75 commits from image_through_model into main 2024-10-20 00:10:27 +02:00
Showing only changes of commit d55adf87ac - Show all commits
+11 -3
View File
@@ -1,5 +1,6 @@
"""Definition of connect function."""
import logging
import os
from typing import Literal
@@ -38,7 +39,14 @@ def connect(
secret_key=minio_secret_key,
secure=False,
)
# ensure bucket exists
if not client.bucket_exists(bucket_name=minio_bucket_name):
client.make_bucket(bucket_name=minio_bucket_name)
# ensure buckets exists
bucket_list = [
'images',
'models',
]
for bucket_name in bucket_list:
if not client.bucket_exists(bucket_name=bucket_name):
logging.info('creating bucket: %s', bucket_name)
client.make_bucket(bucket_name=minio_bucket_name)
logging.debug('finished')
return client