Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdktechno 255 #627

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion technologies/app/mlflow-server/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,20 @@ contexts:
dockerInfo:
image: "saagie/mlflow-server"
baseTag: "2.0"
version: "2.0-1.170.0"
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"
37 changes: 37 additions & 0 deletions technologies/app/mlflow-server/mlflow-server-2.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
22 changes: 22 additions & 0 deletions technologies/app/mlflow-server/mlflow-server-2.9/build.gradle.kts
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>()
1 change: 1 addition & 0 deletions technologies/app/mlflow-server/mlflow-server-2.9/buildMe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
12 changes: 12 additions & 0 deletions technologies/app/mlflow-server/mlflow-server-2.9/context.yaml
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"]
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions technologies/app/mlflow-server/mlflow-server-2.9/image_test.yaml
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"]

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
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -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
Loading