-
Notifications
You must be signed in to change notification settings - Fork 687
MMdeploy build & install script + prerequisites #399
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-v0.5.0 #399 +/- ##
==============================================
- Coverage 62.62% 62.60% -0.02%
==============================================
Files 219 220 +1
Lines 7291 7312 +21
Branches 1120 1126 +6
==============================================
+ Hits 4566 4578 +12
- Misses 2402 2410 +8
- Partials 323 324 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
lvhan028
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, I suggest changing the target branch of this PR to dev-v0.5.0. We would like to make this one a new feature of MMDeploy and announce it when releasing v0.5.0.
lvhan028
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this script targets NVIDIA devices and Linux OS. So perhaps it can be renamed as build_linux_nvidia.sh or something like that.
|
The install script of Anaconda3 will now be installed into this location:
/home/MyHome/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/MyHome/anaconda3] >>> You can also silence install by adding some other flags. This seems like a good way to custom the build. What do you think @lvhan028 @tehkillerbee |
This sounds like a good idea for an interactive install procedure. The default options can then be used for an unattended install. |
Sounds great |
|
Hi, could you drop the unrelated commit (which comes from master branch). |
I tried to cherry pick the related commits and apply them to the dev v0.5.0 instead. Does it look OK to you? |
@grimoire Regarding interactive install, should I just attempt to replicate the behaviour used by the anaconda installer or is there a install script I can use as a base? |
|
We do not have a base script, it is ok to replicate the behavior of anaconda or you can design your own pattern. |
You can |
|
Hi, @tehkillerbee. I think you can work on dev-v0.5.0 branch since there are lots of unrelated commits from master. |
* Auto detect installed version of cmake, gcc. Update if necessary * Prompt to reinstall venv if exists * Disable .tar packing * Enable MMDEPLOY SDK Python * Misc cleanup
Using the default selections is fine. Thanks a lot |
|
Hi, @tehkillerbee can you provide a build method? git clone --recursive https://github.com/open-mmlab/mmdeploy.git
cd mmdeploy
./build_linux_nvidia.sh mmdeployBut I got failures like, Build and install 'mmdeploy'...
cat: MMDeploy/mmdeploy/version.py: No such file or directory
./build_linux_nvidia.sh: line 314: /home/PJLAB/lvhan/Documents/projects/open-mmlab/mmdeploy/venv-mmdeploy/bin/activate: No such file or directory |
I think that is related to the issue mentioned by @grimoire. Initially my script assumed that a MMDeploy folder is found in the root directory. But since the root dir is now MMDeploy, there are some paths that are now incorrect. I will fix it now! |
* Make prebuild archive optional. * Add venv* to gitignore
|
@lvhan028 The script can now run as unattended/auto but it is not strictly silent. Instead, all user interaction is skipped. The default options might need to be changed to something more suitable. You should be able to run it in this way: |
|
Good to me. Any advice @lvhan028 |
|
Can we put this script to |
* Mention default option when reinstalling venv * sudo make install instead of cmake --install
|
@lvhan028 Updated PR according to your comments |
grimoire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Initial commit of build script * Fixed lint * * Set prefix depending on install arch * Auto detect installed version of cmake, gcc. Update if necessary * Prompt to reinstall venv if exists * Disable .tar packing * Enable MMDEPLOY SDK Python * Misc cleanup * Fixed lint * Renamed script * * Set env variables without restarting script. * OpenCV install optional. * Fix numpy OPENBLAS_CORETYPE on numpy >1.19.4. * Remove specific build files. * Fix prebuild output .tar.gz. * Comments added. exec bash when closing script * * Use root dir as MMDeploy dir. * Use pip3. * Remove explicit MMDeploy checkout version. * Use MMDEPLOY_DIR for examples path * Make PyTorch, torchvision, mmcv install optional * * Do not deactivate python venv. * Make prebuild archive optional. * Add venv* to gitignore * * Add support for unattended, interactive install. * Cleanup misc. comments. * Check input arguments before continuing. * Added additional log messages, comments added * Added default option when pressing [ENTER] * * Rearranged cmake, gcc build/install order. * Mention default option when reinstalling venv * sudo make install instead of cmake --install * Moved script to tools/scripts * Fixed relative path when generating WORKING_DIR
* Initial commit of build script * Fixed lint * * Set prefix depending on install arch * Auto detect installed version of cmake, gcc. Update if necessary * Prompt to reinstall venv if exists * Disable .tar packing * Enable MMDEPLOY SDK Python * Misc cleanup * Fixed lint * Renamed script * * Set env variables without restarting script. * OpenCV install optional. * Fix numpy OPENBLAS_CORETYPE on numpy >1.19.4. * Remove specific build files. * Fix prebuild output .tar.gz. * Comments added. exec bash when closing script * * Use root dir as MMDeploy dir. * Use pip3. * Remove explicit MMDeploy checkout version. * Use MMDEPLOY_DIR for examples path * Make PyTorch, torchvision, mmcv install optional * * Do not deactivate python venv. * Make prebuild archive optional. * Add venv* to gitignore * * Add support for unattended, interactive install. * Cleanup misc. comments. * Check input arguments before continuing. * Added additional log messages, comments added * Added default option when pressing [ENTER] * * Rearranged cmake, gcc build/install order. * Mention default option when reinstalling venv * sudo make install instead of cmake --install * Moved script to tools/scripts * Fixed relative path when generating WORKING_DIR
* Initial commit of build script * Fixed lint * * Set prefix depending on install arch * Auto detect installed version of cmake, gcc. Update if necessary * Prompt to reinstall venv if exists * Disable .tar packing * Enable MMDEPLOY SDK Python * Misc cleanup * Fixed lint * Renamed script * * Set env variables without restarting script. * OpenCV install optional. * Fix numpy OPENBLAS_CORETYPE on numpy >1.19.4. * Remove specific build files. * Fix prebuild output .tar.gz. * Comments added. exec bash when closing script * * Use root dir as MMDeploy dir. * Use pip3. * Remove explicit MMDeploy checkout version. * Use MMDEPLOY_DIR for examples path * Make PyTorch, torchvision, mmcv install optional * * Do not deactivate python venv. * Make prebuild archive optional. * Add venv* to gitignore * * Add support for unattended, interactive install. * Cleanup misc. comments. * Check input arguments before continuing. * Added additional log messages, comments added * Added default option when pressing [ENTER] * * Rearranged cmake, gcc build/install order. * Mention default option when reinstalling venv * sudo make install instead of cmake --install * Moved script to tools/scripts * Fixed relative path when generating WORKING_DIR
Hello,
Over the last couple of months, I have been working on a bash script for building and installing MMDeploy and prerequisites to ease the install procedure when we use MMDetection, MMDeploy tools. Maybe this script can serve as a starting point for an easier install procedure when building and installing MMDeploy from source.
Naturally, this script is a work in progress. There are probably parts that can be cleaned up - and maybe some dependencies are not needed to install anymore.
Let me know if there are any suggestions and ideas on how to integrate this script with the MMDeploy
Note: