This is an automated email from the ASF dual-hosted git repository.
byronhsu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 04d9d45 SUBMARINE-884. Fix mllfow backend url with new mysql url.
04d9d45 is described below
commit 04d9d45824da8c184688f23a8180baa25bda1400
Author: jeff-901 <[email protected]>
AuthorDate: Fri Jul 2 09:33:30 2021 +0800
SUBMARINE-884. Fix mllfow backend url with new mysql url.
### What is this PR for?
Backend url in docker-images/mlflow/start.sh is missed to replace with new
mysql url.
Delete unused package in Dockerfile.
### What type of PR is it?
Bug Fix
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-884
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: jeff-901 <[email protected]>
Signed-off-by: byronhsu <[email protected]>
Closes #633 from jeff-901/SUBMARINE-884 and squashes the following commits:
68e4748e [jeff-901] edit uri and delete unused package
787bb998 [jeff-901] edit backend uri
---
dev-support/database/init-database.sh | 3 +--
dev-support/docker-images/database/startup.sh | 3 +--
dev-support/docker-images/mlflow/Dockerfile | 8 +++-----
dev-support/docker-images/mlflow/start.sh | 4 +---
dev-support/mini-submarine/conf/setup-mysql.sh | 5 ++---
5 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/dev-support/database/init-database.sh
b/dev-support/database/init-database.sh
index 968b1b3..0c3b37b 100755
--- a/dev-support/database/init-database.sh
+++ b/dev-support/database/init-database.sh
@@ -39,7 +39,6 @@ mysql -e "CREATE USER IF NOT EXISTS 'metastore'@'%'
IDENTIFIED BY 'password';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'metastore'@'%';"
mysql -e "use metastore; source ./metastore.sql; show tables;"
-mysql -e "CREATE DATABASE IF NOT EXISTS mlflow;"
+mysql -e "CREATE DATABASE IF NOT EXISTS mlflowdb;"
mysql -e "CREATE USER IF NOT EXISTS 'mlflow'@'%' IDENTIFIED BY 'password';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'mlflow'@'%';"
-mysql -e "use mlflow; source ./mlflow.sql; show tables;"
\ No newline at end of file
diff --git a/dev-support/docker-images/database/startup.sh
b/dev-support/docker-images/database/startup.sh
index ef5a591..cce03a8 100755
--- a/dev-support/docker-images/database/startup.sh
+++ b/dev-support/docker-images/database/startup.sh
@@ -31,8 +31,7 @@ CREATE DATABASE metastore;
CREATE USER 'metastore'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'metastore'@'%';
use metastore; source /tmp/database/metastore.sql;
-CREATE DATABASE mlflow;
+CREATE DATABASE mlflowdb;
CREATE USER 'mlflow'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'mlflow'@'%';
-use mlflow; source /tmp/database/mlflow.sql;
EOF
diff --git a/dev-support/docker-images/mlflow/Dockerfile
b/dev-support/docker-images/mlflow/Dockerfile
index 258e594..5467d95 100644
--- a/dev-support/docker-images/mlflow/Dockerfile
+++ b/dev-support/docker-images/mlflow/Dockerfile
@@ -15,11 +15,9 @@
FROM python:3.7.0-slim
-RUN pip install mlflow
+RUN apt-get update && apt-get -y install --no-install-recommends
default-libmysqlclient-dev libpq-dev build-essential wget
-RUN apt-get update && apt-get -y install --no-install-recommends
default-libmysqlclient-dev libpq-dev build-essential sqlite3 wget
-
-RUN pip install mlflow==1.15.0 sqlalchemy==1.4.11 boto3==1.17.58
+RUN pip install mlflow==1.15.0 sqlalchemy==1.4.11 boto3==1.17.58 pymysql==0.9.3
COPY start.sh /usr/local/bin
@@ -30,7 +28,7 @@ RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc
&& chmod +x mc
ENV MLFLOW_S3_ENDPOINT_URL http://submarine-minio-service:9000
ENV AWS_ACCESS_KEY_ID submarine_minio
ENV AWS_SECRET_ACCESS_KEY submarine_minio
-ENV BACKEND_URI mysql+pymysql://mlflow:password@localhost:3306/mlflow
+ENV BACKEND_URI
mysql+pymysql://mlflow:password@submarine-database:3306/mlflowdb
EXPOSE 5000
diff --git a/dev-support/docker-images/mlflow/start.sh
b/dev-support/docker-images/mlflow/start.sh
index 4e9e8c3..95df711 100755
--- a/dev-support/docker-images/mlflow/start.sh
+++ b/dev-support/docker-images/mlflow/start.sh
@@ -33,12 +33,10 @@ check_minio_mlflow_bucket_exists() {
MLFLOW_S3_ENDPOINT_URL="http://submarine-minio-service:9000"
AWS_ACCESS_KEY_ID="submarine_minio"
AWS_SECRET_ACCESS_KEY="submarine_minio"
-BACKEND_URI="sqlite:///store.db"
+BACKEND_URI="mysql+pymysql://mlflow:password@submarine-database:3306/mlflowdb"
DEFAULT_ARTIFACT_ROOT="s3://mlflow"
STATIC_PREFIX="/mlflow"
-/bin/bash -c "sqlite3 store.db"
-
/bin/bash -c "sleep 60; ./mc config host add minio ${MLFLOW_S3_ENDPOINT_URL}
${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY}"
if ! check_minio_mlflow_bucket_exists; then
diff --git a/dev-support/mini-submarine/conf/setup-mysql.sh
b/dev-support/mini-submarine/conf/setup-mysql.sh
index 57d68ad..8b2506a 100755
--- a/dev-support/mini-submarine/conf/setup-mysql.sh
+++ b/dev-support/mini-submarine/conf/setup-mysql.sh
@@ -37,7 +37,6 @@ mysql -e "CREATE USER 'metastore'@'%' IDENTIFIED BY
'password';"
mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'metastore'@'%';"
mysql -e "use metastore; source /home/yarn/database/metastore.sql;"
-mysql -e "CREATE DATABASE mlflow;"
+mysql -e "CREATE DATABASE mlflowdb;"
mysql -e "CREATE USER 'mlflow'@'%' IDENTIFIED BY 'password';"
-mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'mlflow'@'%';"
-mysql -e "use mlflow; source /home/yarn/database/mlflow.sql;"
\ No newline at end of file
+mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'mlflow'@'%';"
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]