3
0
Fork 0
forked from mirrors/nixpkgs

mlflow-server: init at 1.4.0

This commit is contained in:
tbenst 2020-01-06 15:59:25 -08:00 committed by Jon
parent 5c20a955d7
commit a35a2806db
3 changed files with 41 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi
{ stdenv, buildPythonPackage, fetchPypi, isPy27
, alembic
, click
, cloudpickle
@ -26,6 +26,7 @@
buildPythonPackage rec {
pname = "mlflow";
version = "1.4.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;

View file

@ -0,0 +1,37 @@
{lib, python3, writeText}:
let
py = python3.pkgs;
in
py.toPythonApplication
(py.mlflow.overridePythonAttrs(old: rec {
pname = "mlflow-server";
propagatedBuildInputs = old.propagatedBuildInputs ++ [
py.boto3
py.mysqlclient
];
postPatch = ''
substituteInPlace mlflow/utils/process.py --replace \
"child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True," \
"cmd[0]='$out/bin/gunicornMlflow'; child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True,"
'';
gunicornScript = writeText "gunicornMlflow"
''
#!/usr/bin/env python
import re
import sys
from gunicorn.app.wsgiapp import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', ''', sys.argv[0])
sys.exit(run())
'';
postInstall = ''
gpath=$out/bin/gunicornMlflow
cp ${gunicornScript} $gpath
chmod 555 $gpath
'';
}))

View file

@ -15385,6 +15385,8 @@ in
miniHttpd = callPackage ../servers/http/mini-httpd {};
mlflow-server = callPackage ../servers/mlflow-server { };
mlmmj = callPackage ../servers/mail/mlmmj { };
moodle = callPackage ../servers/web-apps/moodle { };