Skip to content

Instantly share code, notes, and snippets.

@otamajakusi
Last active May 29, 2021 03:04
Show Gist options
  • Save otamajakusi/69637ad482ca11f7e86ec7d9b4586285 to your computer and use it in GitHub Desktop.
Save otamajakusi/69637ad482ca11f7e86ec7d9b4586285 to your computer and use it in GitHub Desktop.
Dockerfile for YOLOv5 on Jetson Nano
docker build -t yolov5-docker .
FROM nvcr.io/nvidia/l4t-pytorch:r32.4.4-pth1.6-py3
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y cmake libgtk2.0-dev wget
RUN wget https://nvidia.box.com/shared/static/9eptse6jyly1ggt9axbja2yrmj6pbarc.whl -O torch-1.6.0-cp36-cp36m-linux_aarch64.whl
RUN python3 -m pip install torch-1.6.0-cp36-cp36m-linux_aarch64.whl
RUN python3 -m pip install scikit-build
RUN python3 -m pip install opencv-python
RUN python3 -m pip install tqdm matplotlib PyYAML scipy
RUN git clone https://github.com/ultralytics/yolov5.git -b v3.1
WORKDIR /yolov5
xhost +local:
docker run -it --rm --runtime nvidia --network host --device /dev/video0:/dev/video0:mrw -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix yolov5-docker python3 detect.py --source 0
@AlperGith
Copy link

I am getting the same issue "AssertionError: Python 3.7.0 required by Yolov5, but Python 3.6.9 is currently installed." How can i fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment