Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
53 lines (48 loc) · 2.1 KB
/
Copy pathpyproject.toml
File metadata and controls
53 lines (48 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[tool.poetry]
name = "evaluation_function"
version = "0.0.1"
description = "Lambda Feedback evaluation function that lists the objects a YOLO object-detection model finds in uploaded photos."
authors = ["Andreas Pfurtscheller <andreas.pfurtscheller23@ic.ac.uk>"]
readme = "README.md"
packages = [{ include = "evaluation_function" }]
[tool.poetry.scripts]
evaluation_function = "evaluation_function.main:main"
evaluation_function_dev = "evaluation_function.dev:dev"
[tool.poetry.dependencies]
python = "^3.11"
typing_extensions = "^4.12.2"
lf_toolkit = { git = "https://github.com/lambda-feedback/toolkit-python.git", branch = "main", extras = [
"ipc",
] }
ultralytics = "^8.4.8"
pillow = "^12.1.0"
# Not opencv-python-headless: ultralytics already requires opencv-python, and
# both install into the same `cv2` directory, so having the two side by side
# can leave a corrupted cv2 binary after a parallel install. The Dockerfile
# installs the system libraries opencv-python needs instead.
opencv-python = "^4.12.0.88"
# CPU-only builds: Lambda has no GPU, and the default CUDA build pulls in
# several GB of nvidia-* libraries that make the cold start far too slow.
# The CPU index has no macOS wheels, so other platforms keep using PyPI
# (whose macOS builds are CPU/MPS only anyway).
torch = [
{ version = ">=2.7", source = "pytorch-cpu", markers = "sys_platform == 'linux'" },
{ version = ">=2.7", source = "pypi", markers = "sys_platform != 'linux'" },
]
# torchvision <= 0.12 declares an unpinned torch dependency, so without a
# lower bound the resolver pairs a current torch with an incompatible
# torchvision. Newer releases pin their matching torch version.
torchvision = [
{ version = ">=0.22.1", source = "pytorch-cpu", markers = "sys_platform == 'linux'" },
{ version = ">=0.22.1", source = "pypi", markers = "sys_platform != 'linux'" },
]
[[tool.poetry.source]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
flake8 = "^7.1.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"