diff --git a/technologies/app/mlflow-server/metadata.yaml b/technologies/app/mlflow-server/metadata.yaml index f2a4a7285..a59eceaef 100644 --- a/technologies/app/mlflow-server/metadata.yaml +++ b/technologies/app/mlflow-server/metadata.yaml @@ -63,4 +63,20 @@ contexts: dockerInfo: image: "saagie/mlflow-server" baseTag: "2.0" - version: "2.0-1.170.0" \ No newline at end of file + version: "2.0-1.170.0" + - 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"] + dockerInfo: + image: "saagie/mlflow-server" + baseTag: "2.9.2" + version: "2.9.2-1.178.0_SDKTECHNO-255" \ No newline at end of file diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/Dockerfile b/technologies/app/mlflow-server/mlflow-server-2.9/Dockerfile new file mode 100644 index 000000000..63be2a291 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/Dockerfile @@ -0,0 +1,37 @@ +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 +RUN chmod +x /entrypoint.sh + +EXPOSE 5000 + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/build.gradle.kts b/technologies/app/mlflow-server/mlflow-server-2.9/build.gradle.kts new file mode 100644 index 000000000..173542f56 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/build.gradle.kts @@ -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() +apply() diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/buildMe b/technologies/app/mlflow-server/mlflow-server-2.9/buildMe new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/buildMe @@ -0,0 +1 @@ +true diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/context.yaml b/technologies/app/mlflow-server/mlflow-server-2.9/context.yaml new file mode 100644 index 000000000..70f9bc632 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/context.yaml @@ -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"] \ No newline at end of file diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/dockerInfo.yaml b/technologies/app/mlflow-server/mlflow-server-2.9/dockerInfo.yaml new file mode 100644 index 000000000..27f40fc49 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/dockerInfo.yaml @@ -0,0 +1,4 @@ +image: saagie/mlflow-server +baseTag: 2.9.2 +dynamicVersion: 1.178.0_SDKTECHNO-255 +version: 2.9.2-1.178.0_SDKTECHNO-255 diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/image_test.yaml b/technologies/app/mlflow-server/mlflow-server-2.9/image_test.yaml new file mode 100644 index 000000000..55f05c931 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/image_test.yaml @@ -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"] + diff --git a/technologies/app/mlflow-server/mlflow-server-2.9/resources/entrypoint.sh b/technologies/app/mlflow-server/mlflow-server-2.9/resources/entrypoint.sh new file mode 100644 index 000000000..4eb2b9667 --- /dev/null +++ b/technologies/app/mlflow-server/mlflow-server-2.9/resources/entrypoint.sh @@ -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 +://:@:/ 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 \ No newline at end of file diff --git a/version.properties b/version.properties index d07e8bf29..a55f5f812 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ -version.buildmeta= +version.buildmeta=SDKTECHNO-255 version.major=1 version.minor=178 version.patch=0 version.prerelease= -version.semver=1.178.0 +version.semver=1.178.0+SDKTECHNO-255