2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonAtLeast
|
|
|
|
, fetchFromGitHub
|
|
|
|
, colorcet
|
|
|
|
, cryptography
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
|
|
|
, flask-compress
|
|
|
|
, flask-cors
|
|
|
|
, flask-sockets
|
2021-05-20 23:08:51 +00:00
|
|
|
, gevent
|
2020-09-25 04:45:31 +00:00
|
|
|
, imageio
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, pillow
|
2021-05-20 23:08:51 +00:00
|
|
|
, pyopenssl
|
|
|
|
, scipy
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
, unidecode
|
|
|
|
, urllib3
|
2021-05-20 23:08:51 +00:00
|
|
|
, wget
|
|
|
|
, deepdiff
|
|
|
|
, pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
2021-08-10 14:31:46 +00:00
|
|
|
, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "runway-python";
|
2020-12-26 04:20:00 +00:00
|
|
|
version = "0.6.1";
|
2021-08-10 14:31:46 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "runwayml";
|
|
|
|
repo = "model-sdk";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorcet
|
2021-05-20 23:08:51 +00:00
|
|
|
cryptography
|
2020-09-25 04:45:31 +00:00
|
|
|
flask
|
|
|
|
flask-compress
|
|
|
|
flask-cors
|
|
|
|
flask-sockets
|
|
|
|
gevent
|
|
|
|
imageio
|
|
|
|
numpy
|
|
|
|
pillow
|
2021-05-20 23:08:51 +00:00
|
|
|
pyopenssl
|
2020-09-25 04:45:31 +00:00
|
|
|
scipy
|
|
|
|
six
|
|
|
|
unidecode
|
|
|
|
urllib3
|
|
|
|
wget
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"runway"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
deepdiff
|
|
|
|
pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-cov
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# these tests require network
|
|
|
|
"test_file_deserialization_remote"
|
|
|
|
"test_file_deserialization_absolute_directory"
|
|
|
|
"test_file_deserialization_remote_directory"
|
2021-08-10 14:31:46 +00:00
|
|
|
# Fails with a decoding error at the moment
|
|
|
|
"test_inference_async"
|
2021-05-20 23:08:51 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.9") [
|
|
|
|
# AttributeError: module 'base64' has no attribute 'decodestring
|
|
|
|
# https://github.com/runwayml/model-sdk/issues/99
|
|
|
|
"test_image_serialize_and_deserialize"
|
|
|
|
"test_segmentation_serialize_and_deserialize_colormap"
|
|
|
|
"test_segmentation_serialize_and_deserialize_labelmap"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Helper library for creating Runway models";
|
|
|
|
homepage = "https://github.com/runwayml/model-sdk";
|
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
maintainers = with lib.maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|