Comments (16)
I had the similar issue. Try this comment: Run yolov5 on Jetson Nano
from dockerfile-yolov5-jetson.
It works !
Thank you!!
from dockerfile-yolov5-jetson.
@phongvu0403
It works using "git checkout 91547edec1a33121b3607e8c946e051514182b4f".
But I could not use my custom training weights, because of "_pickle.UnpicklingError" like below,
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.25, device='', exist_ok=False, hide_conf=False, hide_labels=False, img_size=640, iou_thres=0.45, line_thickness=3, name='exp', nosave=False, project='runs/detect', save_conf=False, save_crop=False, save_txt=False, source='data/images', update=False, view_img=False, weights=['../yolov5_01/my_yolov5s.pt'])
YOLOv5 \U0001f680 v5.0-75-g91547ed torch 1.8.0 CUDA:0 (NVIDIA Tegra X1, 3964.1328125MB)
Traceback (most recent call last):
File "detect.py", line 181, in
detect(opt=opt)
File "detect.py", line 33, in detect
model = attempt_load(weights, map_location=device) # load FP32 model
File "/yolov5/models/experimental.py", line 120, in attempt_load
ckpt = torch.load(w, map_location=map_location) # load
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 762, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '-'.
from dockerfile-yolov5-jetson.
@okome-git
I modified the Dockerfile following the author's instructions. However, there is 1 error here:
Step 15/18 : RUN git clone https://github.com/ultralytics/yolov5.git
---> Running in 0fd30920640d
Cloning into 'yolov5'...
Removing intermediate container 0fd30920640d
---> e70d45f62147
Step 16/18 : RUN git checkout 91547edec1a33121b3607e8c946e051514182b4f
---> Running in 08ab50a200dc
fatal: not a git repository (or any of the parent directories): .git
The command '/bin/sh -c git checkout 91547edec1a33121b3607e8c946e051514182b4f' returned a non-zero code: 128
Can you help me fixed this problem?
Thank you!
from dockerfile-yolov5-jetson.
I think your jetpack should be updated to 4.5 or higher.
Try it!
from dockerfile-yolov5-jetson.
I updated to jetpack 4.5 today.
And, it didn't not work...
There was same issue
"AssertionError: Python 3.7.0 required by YOLOv5, but Python 3.6.9 is currently installed"
from dockerfile-yolov5-jetson.
Ok, I'd like to confirm this weekend.
from dockerfile-yolov5-jetson.
Thanks !!
from dockerfile-yolov5-jetson.
recent commits at yolov5, ultralytics/yolov5#3088, requires python3.7 or higher.
I'd like to fix this issue. thanks.
from dockerfile-yolov5-jetson.
Thank you for your kindness !
Do you know which commit of yolov5 is suitable for jetpack 4.5 ?
from dockerfile-yolov5-jetson.
@okome-git
before ultralytics/yolov5#3088, I think 91547edec1a33121b3607e8c946e051514182b4f can be used, like this:
diff --git a/Dockerfile b/Dockerfile
index 3b46f20..8dfe8e4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,5 +19,6 @@ RUN git clone --recursive https://github.com/skvark/opencv-python.git
RUN python3 -m pip install --upgrade pip
RUN cd opencv-python && python3 -m pip wheel . --verbose && find . -name "opencv_python*.whl" | xargs python3 -m pip install
RUN git clone https://github.com/ultralytics/yolov5.git
+RUN git checkout 91547edec1a33121b3607e8c946e051514182b4f
RUN cd yolov5 && python3 -m pip install -r requirements.txt
WORKDIR /yolov5
from dockerfile-yolov5-jetson.
Hello, I have same issue "AssertionError: Python 3.7.0 required by YOLOv5, but Python 3.6.9 is currently installed". I installed jetpack 4.5.1. In my Jetson Nano, Python version default is 3.6.9 then I installed Python 3.7.5 and I point python3 to python3.7. So when I type "python3 --version", terminal show "python 3.7.5". But this problem still exists.
Can you help me?
Thank advance
from dockerfile-yolov5-jetson.
Currently #8 (comment) is the only workaround for this issue.
Even if you install python3.7 on the docker environment, pytorch can not be worked.
from dockerfile-yolov5-jetson.
I think you should set cd yolov5
before git checkout 91547edec1a33121b3607e8c946e051514182b4f
.
from dockerfile-yolov5-jetson.
workaround is add at c46325b
and default branch is changed to war-python36
, since this is a workaround, not a solution.
please fetch and change your branch to war-python36
.
from dockerfile-yolov5-jetson.
3c8e946 supports python3.8 and default branch has been changed to main
.
In this commit, pre-build pytorch binary is used, which was build with https://github.com/otamajakusi/dockerfile-pytorch-build-jetson repo.
thanks.
from dockerfile-yolov5-jetson.
Related Issues (14)
- jetpack 4.5 support HOT 2
- Dockerfile Failed to clone 'opencv_extra' at step 15/19 HOT 2
- Purpose of the Dockerfile Base Image if we are installing torch and torchvision? HOT 4
- Is it possible to reduce launch time? HOT 4
- OCI runtime create failed: HOT 2
- Build.sh complains about unknown JetPack version even though I'm on 4.6 HOT 2
- ImportError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block HOT 7
- Wrong Python Version HOT 5
- [SOLVED] docker: unknown server OS: .
- Failed to load module "canberra-gtk-module" using MIPI CSI Camera HOT 8
- RuntimeError: CUDA error: device kernel image is invalid HOT 13
- Run Yolov5 on host environment instead of container HOT 2
- Cannot run yolov5 on Python3.6 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfile-yolov5-jetson.