Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MMSIG] Support mmdeploy Docker for Jetson #2587

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

yinfan98
Copy link
Contributor

@yinfan98 yinfan98 commented Dec 6, 2023

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Install mmdeploy on Jetson is really hard, so build a docker may a gd

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
no

Use cases (Optional)

see jetson_docker.md .

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@yinfan98
Copy link
Contributor Author

yinfan98 commented Dec 6, 2023

I will add the other file later

@yinfan98
Copy link
Contributor Author

yinfan98 commented Dec 6, 2023

Hi, @RunningLeon where can I add the Jetson docker CI, and can I make an individual CI file for Jetson docker?
(I will fix the lint later TAT

build PyTorch 1.10.0 with python3.8
build torchvision 0.11.0 with python3.8
solve the problem 3 && 4 using sed in docker
python3.8 -m pip install --upgrade --no-cache-dir setuptools packaging 'Cython<3' wheel &&\
python3.8 -m pip install --no-cache-dir --verbose wget psutil numpy &&\
python3.8 -m pip install --upgrade --force-reinstall --no-cache-dir --verbose cmake protobuf
python3.8 -m pip install onnx==1.10 versioned-hdf5 numpy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why install versioned-hdf5 numpy here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numpy here need to update, versioned-hdf5 here for pycuda

apt-get install -y vim wget libspdlog-dev libssl-dev libpng-dev pkg-config libhdf5-100 libhdf5-dev patch --no-install-recommends\
python3.8 python3.8-dev python3.8-pip --no-install-recommends &&\
python3.8 -m pip install --upgrade --no-cache-dir setuptools packaging 'Cython<3' wheel &&\
python3.8 -m pip install --no-cache-dir --verbose wget psutil numpy &&\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need to install these packages?

Copy link
Contributor Author

@yinfan98 yinfan98 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3.8 -m pip install --upgrade --no-cache-dir setuptools packaging 'Cython<3' wheel &&\
python3.8 -m pip install --no-cache-dir --verbose wget psutil numpy &&\

this package for build the pytorch, I referenc from l4t repo

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA &&\
apt-get remove python3 &&\
apt-get update &&\
apt-get install -y vim wget libspdlog-dev libssl-dev libpng-dev pkg-config libhdf5-100 libhdf5-dev patch --no-install-recommends\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need libhdf5-100 libhdf5-dev patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make -j$(nproc) && make install

# add the patch to solve the torch.distributed issue in docker
RUN cd mmdeploy/tools &&\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we use rewrite to do this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have no idea how to rewrite this TAT.

Copy link

codecov bot commented Dec 25, 2023

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (c4dc10d) 48.50% compared to head (14f4f3a) 48.36%.
Report is 15 commits behind head on main.

Files Patch % Lines
...oy/codebase/mmdet/models/roi_heads/htc_roi_head.py 33.33% 12 Missing ⚠️
...oy/codebase/mmpose/models/heads/yolox_pose_head.py 7.69% 12 Missing ⚠️
...loy/codebase/mmpose/deploy/pose_detection_model.py 28.57% 8 Missing and 2 partials ⚠️
mmdeploy/pytorch/functions/distribute.py 0.00% 7 Missing ⚠️
mmdeploy/backend/onnxruntime/wrapper.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2587      +/-   ##
==========================================
- Coverage   48.50%   48.36%   -0.14%     
==========================================
  Files         355      358       +3     
  Lines       13795    13857      +62     
  Branches     2050     2048       -2     
==========================================
+ Hits         6691     6702      +11     
- Misses       6653     6700      +47     
- Partials      451      455       +4     
Flag Coverage Δ
unittests 48.36% <25.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

None yet

2 participants