Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / clip-anytorch / default.nix
blobd17a1ad088fdbd0e7f3cdb5e9d14901375d9ca29
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # dependencies
6 , ftfy
7 , regex
8 , tqdm
9 , torch
10 , torchvision
12 # tests
13 , pytestCheckHook
16 buildPythonPackage rec {
17   pname = "clip-anytorch";
18   version = "2.6.0";
19   format = "setuptools";
21   src = fetchFromGitHub {
22     owner = "rom1504";
23     repo = "CLIP";
24     rev = "refs/tags/${version}";
25     hash = "sha256-4A8R9aEiOWC05uhMQslhVSkQ4hyjs6VsqkFi76miodY=";
26   };
28   propagatedBuildInputs = [
29     ftfy
30     regex
31     tqdm
32     torch
33     torchvision
34   ];
36   pythonImportsCheck = [
37     "clip"
38   ];
40   # all tests require network access
41   doCheck = false;
43   nativeCheckInputs = [
44     pytestCheckHook
45   ];
47   preCheck = ''
48     export HOME=$TMPDIR
49   '';
51   meta = with lib; {
52     description = "Contrastive Language-Image Pretraining";
53     homepage = "https://github.com/rom1504/CLIP";
54     license = licenses.mit;
55     maintainers = teams.tts.members;
56   };