Skip to content

Commit

Permalink
Add yolov8 model step
Browse files Browse the repository at this point in the history
  • Loading branch information
HeavenVolkoff committed Dec 5, 2023
1 parent 9df301b commit d5b8c8c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ RUN --mount=type=cache,target=/root/.cache `
--mount=type=bind,source=stages/99-pdfium.sh,target=/srv/stage.sh `
/srv/build.sh

FROM layer-00 AS layer-99-yolo

RUN --mount=type=cache,target=/root/.cache `
--mount=type=bind,source=stages/99-yolov8.sh,target=/srv/stage.sh `
/srv/build.sh

FROM layer-20 AS layer-99-onnx

RUN --mount=type=cache,target=/root/.cache `
Expand Down
3 changes: 3 additions & 0 deletions scripts/create-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ mv "${OUT}/include" "${OUT}/${_framework}/Versions/A/Headers"
# Move licenses to Framework
mv "${OUT}/licenses" "${OUT}/${_framework}/Versions/A/Resources/Licenses"

# Move models to Framework
mv "${OUT}/models" "${OUT}/${_framework}/Versions/A/Resources/Models"

# Create required framework symlinks
ln -s A "${OUT}/${_framework}/Versions/Current"
ln -s Versions/Current/Headers "${OUT}/${_framework}/Headers"
Expand Down
16 changes: 16 additions & 0 deletions stages/99-yolov8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env -S bash -euo pipefail

echo "Download yolov8 model..."

_tag='yolo-2023-12-04'
case "$TARGET" in
*windows*)
_name='yolov8s_win.onnx'
;;
*linux* | *darwin*)
_name='yolov8s.onnx'
;;
esac

mkdir -p "${OUT}/models"
curl -LSsO "${OUT}/models/yolov8s.onnx" "https://github.com/spacedriveapp/native-deps/releases/download/${_tag}/${_name}"

0 comments on commit d5b8c8c

Please sign in to comment.