1 { python3Packages, writers }:
6 gunicornScript = writers.writePython3 "gunicornMlflow" { } ''
9 from gunicorn.app.wsgiapp import run
10 if __name__ == '__main__':
11 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', ''', sys.argv[0])
15 py.toPythonApplication (
16 py.mlflow.overridePythonAttrs (old: {
18 propagatedBuildInputs = old.dependencies ++ [
26 cat mlflow/utils/process.py
28 substituteInPlace mlflow/utils/process.py --replace-fail \
29 "process = subprocess.Popen(" \
30 "cmd[0]='${gunicornScript}'; process = subprocess.Popen("
34 gpath=$out/bin/gunicornMlflow
35 cp ${gunicornScript} $gpath