mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-11-04 07:09:22 +01:00
bugfix: adds bucket name configuration into the .env file
This commit is contained in:
@@ -6,6 +6,7 @@ from minio.error import ResponseError
|
||||
accessID = os.environ.get('AWS_ACCESS_KEY_ID')
|
||||
accessSecret = os.environ.get('AWS_SECRET_ACCESS_KEY')
|
||||
minioUrl = os.environ.get('MLFLOW_S3_ENDPOINT_URL')
|
||||
bucketName = os.environ.get('AWS_BUCKET_NAME')
|
||||
|
||||
if accessID == None:
|
||||
print('[!] AWS_ACCESS_KEY_ID environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||
@@ -19,6 +20,11 @@ if minioUrl == None:
|
||||
print('[!] MLFLOW_S3_ENDPOINT_URL environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||
exit(1)
|
||||
|
||||
|
||||
if bucketName == None:
|
||||
print('[!] AWS_BUCKET_NAME environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||
exit(1)
|
||||
|
||||
minioUrlHostWithPort = minioUrl.split('//')[1]
|
||||
print('[*] minio url: ',minioUrlHostWithPort)
|
||||
|
||||
@@ -29,4 +35,4 @@ s3Client = Minio(
|
||||
secure=False
|
||||
)
|
||||
|
||||
s3Client.make_bucket('mlflow')
|
||||
s3Client.make_bucket(bucketName)
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
source .env
|
||||
|
||||
set -o allexport; source .env; set +o allexport
|
||||
|
||||
pip install Minio
|
||||
python ./create_bucket.py
|
||||
Reference in New Issue
Block a user