mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-11-04 23:29:19 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcd3393fa5 | ||
|
|
14df7c707e | ||
|
|
7506d3e43d | ||
|
|
8f3d6ba7e2 | ||
|
|
81e373d6fb | ||
|
|
eebc9d0c46 | ||
|
|
bddbec77f1 |
11
README.md
11
README.md
@@ -4,6 +4,8 @@ If you want to boot up mlflow project with one-liner - this repo is for you.
|
||||
|
||||
The only requirement is docker installed on your system and we are going to use Bash on linux/windows.
|
||||
|
||||
[](https://www.youtube.com/watch?v=ma5lA19IJRA)
|
||||
|
||||
# Features
|
||||
- Setup by one file (.env)
|
||||
- Production-ready docker volumes
|
||||
@@ -24,7 +26,14 @@ Creating tracker_mlflow ... 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>
|
||||
|
||||
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!**
|
||||
|
||||
38
create_bucket.py
Normal file
38
create_bucket.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
|
||||
from minio import Minio
|
||||
from minio.error import InvalidResponseError
|
||||
|
||||
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')
|
||||
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)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
s3Client = Minio(
|
||||
minioUrlHostWithPort,
|
||||
access_key=accessID,
|
||||
secret_key=accessSecret,
|
||||
secure=False
|
||||
)
|
||||
|
||||
s3Client.make_bucket(bucketName)
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.2'
|
||||
services:
|
||||
s3:
|
||||
image: minio/minio:latest
|
||||
image: minio/minio:RELEASE.2021-06-14T01-29-23Z
|
||||
container_name: aws-s3
|
||||
ports:
|
||||
- 9000:9000
|
||||
|
||||
6
run_create_bucket.sh
Normal file
6
run_create_bucket.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o allexport; source .env; set +o allexport
|
||||
|
||||
pip3 install Minio
|
||||
python3 ./create_bucket.py
|
||||
Reference in New Issue
Block a user