Skip to content

Commit 1a2c2ac

Browse files
authored
fix: add missing onnxslim package (#30)
1 parent 78794da commit 1a2c2ac

File tree

5 files changed

+103
-3
lines changed

5 files changed

+103
-3
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,34 @@
44

55
### Docker
66

7+
Pull dependencies
8+
79
```shell
8-
git clone https://github.com/aslafy-z/yolo-object-detection-samples ./samples
10+
git lfs clone https://github.com/aslafy-z/yolo-object-detection-samples ./samples
911
docker pull ghcr.io/aslafy-z/yolo-object-detection-cli:main
12+
```
13+
14+
Run with CPU support:
15+
16+
```shell
1017
docker run -it --rm \
1118
-v $PWD/samples/data:/samples \
1219
-p 8000:8000 \
1320
ghcr.io/aslafy-z/yolo-object-detection-cli:main \
1421
--source=/samples/shop.mp4
1522
```
1623

17-
> Note: To run with the nvidia runtime, add `--ipc=host --gpus all` to the `docker run` command.
24+
Run with GPU support:
25+
26+
```shell
27+
docker run -it --rm \
28+
-v $PWD/samples/data:/samples \
29+
-p 8000:8000 \
30+
--ipc=host --gpus=all --runtime=nvidia --security-opt systempaths=unconfined \
31+
ghcr.io/aslafy-z/yolo-object-detection-cli:main \
32+
--source=/samples/shop.mp4 \
33+
--device=cuda:0
34+
```
1835

1936
### System
2037

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ dependencies = [
2020
"paho-mqtt==2.1.0",
2121
"scikit-image==0.21.0",
2222
"pytubefix>=6.5.2",
23+
"onnxslim==0.1.43",
2324
]

requirements.docker.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ lapx==0.5.11
88
paho-mqtt==2.1.0
99
scikit-image==0.21.0
1010
pytubefix>=6.5.2
11+
onnxslim==0.1.43

requirements.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ numpy==1.23.5
6666
# imageio
6767
# lapx
6868
# matplotlib
69+
# onnx
6970
# opencv-python
7071
# pandas
7172
# pywavelets
@@ -107,6 +108,10 @@ nvidia-nvjitlink-cu12==12.6.85
107108
# nvidia-cusparse-cu12
108109
nvidia-nvtx-cu12==12.1.105
109110
# via torch
111+
onnx==1.17.0
112+
# via onnxslim
113+
onnxslim==0.1.43
114+
# via yolo-object-detection-cli (pyproject.toml)
110115
opencv-python==4.8.1.78
111116
# via
112117
# yolo-object-detection-cli (pyproject.toml)
@@ -115,6 +120,7 @@ packaging==24.2
115120
# via
116121
# lazy-loader
117122
# matplotlib
123+
# onnxslim
118124
# scikit-image
119125
paho-mqtt==2.1.0
120126
# via yolo-object-detection-cli (pyproject.toml)
@@ -129,6 +135,8 @@ pillow==10.4.0
129135
# scikit-image
130136
# torchvision
131137
# ultralytics
138+
protobuf==5.29.1
139+
# via onnx
132140
psutil==6.1.0
133141
# via ultralytics
134142
py-cpuinfo==9.0.0
@@ -172,7 +180,9 @@ sniffio==1.3.1
172180
starlette==0.27.0
173181
# via fastapi
174182
sympy==1.13.3
175-
# via torch
183+
# via
184+
# onnxslim
185+
# torch
176186
tifffile==2023.7.10
177187
# via scikit-image
178188
torch==2.1.2

0 commit comments

Comments
 (0)