-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
technologies/app/mlflow-server/mlflow-server-2.9/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM python:3.10.13-bullseye | ||
|
||
RUN mkdir /mlflow/ | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y openjdk-11-jdk && \ | ||
apt-get clean; | ||
|
||
RUN cd / \ | ||
&& mkdir app \ | ||
&& cd app \ | ||
&& wget https://archive.apache.org/dist/hadoop/common/hadoop-2.6.5/hadoop-2.6.5.tar.gz \ | ||
&& tar xvf hadoop-2.6.5.tar.gz \ | ||
&& rm hadoop-2.6.5.tar.gz \ | ||
&& rm -rf hadoop-2.6.5/etc/hadoop \ | ||
&& ln -s /etc/hadoop/conf hadoop-2.6.5/etc/hadoop; | ||
|
||
ENV PATH "/app/hadoop-2.6.5/bin:${PATH}" | ||
|
||
RUN apt-get update && \ | ||
apt-get install ca-certificates-java && \ | ||
apt-get clean && \ | ||
update-ca-certificates -f; | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ | ||
ENV HADOOP_HOME=/app/hadoop-2.6.5 | ||
ENV HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop-2.6.5 | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install mlflow==2.9.2 SQLAlchemy==1.4.0 mysqlclient pyarrow boto3 psycopg2-binary==2.8.5 protobuf==3.20.* | ||
|
||
COPY resources/entrypoint.sh entrypoint.sh | ||
|
||
EXPOSE 5000 | ||
|
||
ENTRYPOINT [ "./entrypoint.sh" ] |
22 changes: 22 additions & 0 deletions
22
technologies/app/mlflow-server/mlflow-server-2.9/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright 2019 Pierre Leresteux. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import com.bmuschko.gradle.docker.DockerRemoteApiPlugin | ||
import com.saagie.technologies.SaagieTechnologiesGradlePlugin | ||
|
||
apply<DockerRemoteApiPlugin>() | ||
apply<SaagieTechnologiesGradlePlugin>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
true |
12 changes: 12 additions & 0 deletions
12
technologies/app/mlflow-server/mlflow-server-2.9/context.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
id: mlflow-server-2.9 | ||
label: "2.9" | ||
releaseNotes: First version of MLFlow Server 2.9 into Saagie. | ||
available: true | ||
trustLevel: stable | ||
recommended: true | ||
ports: | ||
- port: 5000 | ||
name: Mlflow Server | ||
rewriteUrl: true | ||
basePath: SAAGIE_BASE_PATH | ||
volumes: ["/sqlite_directory"] |
4 changes: 4 additions & 0 deletions
4
technologies/app/mlflow-server/mlflow-server-2.9/dockerInfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
image: saagie/mlflow-server | ||
baseTag: 2.9 | ||
dynamicVersion: | ||
version: |
51 changes: 51 additions & 0 deletions
51
technologies/app/mlflow-server/mlflow-server-2.9/image_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
schemaVersion: "2.0.0" | ||
|
||
metadataTest: | ||
env: | ||
- key: "HADOOP_CONF_DIR" | ||
value: "/app/hadoop-2.6.5/etc/hadoop-2.6.5" | ||
|
||
fileExistenceTests: | ||
|
||
fileContentTests: | ||
|
||
commandTests: | ||
- name: "Workdir" | ||
command: "pwd" | ||
expectedOutput: ["/"] | ||
|
||
- name: "python version" | ||
command: "python" | ||
args: ["-V"] | ||
expectedOutput: ["Python 3.10*"] | ||
|
||
- name: "mlflow version" | ||
command: "mlflow" | ||
args: ["--version"] | ||
expectedOutput: ["mlflow, version 2.9.2"] | ||
|
||
- name: "pip mlflow" | ||
command: "pip" | ||
args: ["show","mlflow"] | ||
expectedOutput: ["Name: mlflow"] | ||
|
||
- name: "pip SQLAlchemy" | ||
command: "pip" | ||
args: ["show","SQLAlchemy"] | ||
expectedOutput: ["Name: SQLAlchemy"] | ||
|
||
- name: "pip mysqlclient" | ||
command: "pip" | ||
args: ["show","mysqlclient"] | ||
expectedOutput: ["Name: mysqlclient"] | ||
|
||
- name: "pip pyarrow" | ||
command: "pip" | ||
args: ["show","pyarrow"] | ||
expectedOutput: ["Name: pyarrow"] | ||
|
||
- name: "pip psycopg2-binary" | ||
command: "pip" | ||
args: ["show","psycopg2-binary"] | ||
expectedOutput: ["Name: psycopg2-binary"] | ||
|
19 changes: 19 additions & 0 deletions
19
technologies/app/mlflow-server/mlflow-server-2.9/resources/entrypoint.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
if [[ -z "${MLFLOW_BACKEND_STORE_URI}" ]]; then | ||
echo "ERROR : MLFLOW_BACKEND_STORE_URI environment variable must be set" | ||
echo "Usage : MLFLOW_BACKEND_STORE_URI = database-backed store as SQLAlchemy database URI <dialect>+<driver>://<username>:<password>@<host>:<port>/<database> MLflow supports the database dialects mysql, mssql, sqlite, and postgresql." | ||
exit 1 | ||
elif [[ -z "${MLFLOW_DEFAULT_ARTIFACTORY_ROOT}" ]]; then | ||
echo "ERROR : MLFLOW_DEFAULT_ARTIFACTORY_ROOT environment variable must be set" | ||
echo "Usage : MLFLOW_DEFAULT_ARTIFACTORY_ROOT = default location to server’s artifact store (e.g. hdfs://cluster:8020/artifactory/mlflow )" | ||
exit 1 | ||
else | ||
echo "Starting MLflow Server" | ||
mlflow server \ | ||
--backend-store-uri ${MLFLOW_BACKEND_STORE_URI} \ | ||
--default-artifact-root ${MLFLOW_DEFAULT_ARTIFACTORY_ROOT} \ | ||
--host 0.0.0.0 | ||
fi |