mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-11-04 15:19:21 +01:00
adds minio autoconfigure script
This commit is contained in:
@@ -24,7 +24,14 @@ Creating tracker_mlflow ... done
|
|||||||
Creating aws-s3 ... done
|
Creating aws-s3 ... done
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Create mlflow bucket. You can do it **either using AWS CLI or Python Api**. **You dont need an AWS subscription**
|
3. Create mlflow bucket. You can use my bundled script.
|
||||||
|
|
||||||
|
Just run
|
||||||
|
```shell
|
||||||
|
bash ./run_create_bucket.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also do it **either using AWS CLI or Python Api**.
|
||||||
<details><summary>AWS CLI</summary>
|
<details><summary>AWS CLI</summary>
|
||||||
|
|
||||||
1. [Install AWS cli](https://aws.amazon.com/cli/) **Yes, i know that you dont have an Amazon Web Services Subscription - dont worry! It wont be needed!**
|
1. [Install AWS cli](https://aws.amazon.com/cli/) **Yes, i know that you dont have an Amazon Web Services Subscription - dont worry! It wont be needed!**
|
||||||
|
|||||||
32
create_bucket.py
Normal file
32
create_bucket.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from minio import Minio
|
||||||
|
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')
|
||||||
|
|
||||||
|
if accessID == None:
|
||||||
|
print('[!] AWS_ACCESS_KEY_ID environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if accessSecret == None:
|
||||||
|
print('[!] AWS_SECRET_ACCESS_KEY environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if minioUrl == None:
|
||||||
|
print('[!] MLFLOW_S3_ENDPOINT_URL environemnt variable is empty! run \'source .env\' to load it from the .env file')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
minioUrlHostWithPort = minioUrl.split('//')[1]
|
||||||
|
print('[*] minio url: ',minioUrlHostWithPort)
|
||||||
|
|
||||||
|
s3Client = Minio(
|
||||||
|
minioUrlHostWithPort,
|
||||||
|
access_key=accessID,
|
||||||
|
secret_key=accessSecret,
|
||||||
|
secure=False
|
||||||
|
)
|
||||||
|
|
||||||
|
s3Client.make_bucket('mlflow')
|
||||||
4
run_create_bucket.sh
Normal file
4
run_create_bucket.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source .env
|
||||||
|
pip install Minio
|
||||||
|
python ./create_bucket.py
|
||||||
Reference in New Issue
Block a user