diff options
Diffstat (limited to 'pkgs/development/python-modules/clip/default.nix')
-rw-r--r-- | pkgs/development/python-modules/clip/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/clip/default.nix b/pkgs/development/python-modules/clip/default.nix new file mode 100644 index 0000000000000..bf10f5be593fc --- /dev/null +++ b/pkgs/development/python-modules/clip/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, fetchFromGitHub +, ftfy +, lib +, regex +, torch +, torchvision +, tqdm +}: + +buildPythonPackage rec { + pname = "clip"; + version = "unstable-2022-11-17"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "openai"; + repo = pname; + rev = "d50d76daa670286dd6cacf3bcd80b5e4823fc8e1"; + hash = "sha256-GAitNBb5CzFVv2+Dky0VqSdrFIpKKtoAoyqeLoDaHO4="; + }; + + propagatedBuildInputs = [ + ftfy + regex + torch + torchvision + tqdm + ]; + + pythonImportsCheck = [ "clip" ]; + + meta = with lib; { + description = "Contrastive Language-Image Pretraining"; + homepage = "https://github.com/openai/CLIP"; + license = licenses.mit; + maintainers = with maintainers; [ samuela ]; + }; +} |