pantry/projects/github.com/VikParuchuri/surya/package.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

distributable:
url: git+https://github.com/VikParuchuri/surya.git
ref: ${{version.tag}}
display-name: Surya
versions:
github: VikParuchuri/surya
dependencies:
2024-01-16 21:24:53 +03:00
pkgx.sh: ^1
linux:
mesa3d.org: ^23.3
gnome.org/glib: ^2
build:
dependencies:
2024-01-16 21:24:53 +03:00
python.org: ~3.11
python-poetry.org: ^1.7
script:
- bkpyvenv stage --engine=poetry {{prefix}} {{version}}
2024-05-09 22:02:38 +03:00
2024-01-16 21:24:53 +03:00
# cv2 libs are compiled for MACOSX_DEPLOYMENT_TARGET=12.0
2024-01-16 21:24:53 +03:00
- run: poetry config --local installer.no-binary opencv-python
2024-01-16 21:24:53 +03:00
if: darwin
2024-05-09 22:02:38 +03:00
# torch removed darwin/x86-64 binaries in 2.3.0
# https://github.com/pytorch/pytorch/pull/116726
- run: |
if test "{{hw.platform}}/{{hw.arch}}" = "darwin/x86-64"; then
sed -i 's/^torch.*/torch = "=2.2.2"/' pyproject.toml
poetry lock
fi
if: '>=0.4.4'
- poetry install
- bkpyvenv seal --engine=poetry {{prefix}} surya_detect
provides:
- bin/surya_detect
test:
dependencies:
curl.se: '*'
script:
- curl -L "https://raw.githubusercontent.com/VikParuchuri/surya/master/static/images/benchmark_chart_small.png" -o test.png
- surya_detect ./test.png --images
- cat results/surya/test/results.json | grep "[209, 2, 722, 17]"