-
Notifications
You must be signed in to change notification settings - Fork 97
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
correct dockerfile & upgrade to nvidia-docker2 #40
base: master
Are you sure you want to change the base?
Conversation
Awesome, thanks for submitting this PR!
…On Tue, Nov 27, 2018 at 8:34 AM Ian Chen ***@***.***> wrote:
Conclusion
1. support nvidia-docker2
2. a new dockerfile that can finally be built
3. can run on ubuntu 18.04 now
4. Add documentation for RealSense2 camera
5. Add documentation for camera calibration
6. fix some bugs
Bug fix
1. the cdlf command can work now
2. Support variable length of object-models
------------------------------
You can view, comment on, or merge this pull request online at:
#40
Commit Summary
- fix alias cdlf
- add env settings
- change input number
- expand nvidia-docker command into mult-line
- seperate the install_dependcies.sh for readability
- successfully compiled director
- install elastic fusion's dependencies
- compiled successfully
- change docker run options
- fix dependency for ubuntu 16.04
- use the older version of director
- add elasticfusion camera.cfg
- add D435 camera parameter to render train image proccess
- add intel realsense camera usage
- Update README.rst
- update realsense operation guide
- Add camera calibration parameter doc
- combine multiple RUN command and stop from sourcing other scripts
- clean up code and use the latetest docker image
- remove unnecessary files and add a config file
- change the size of object to variable length
- changes for pr
File Changes
- *M* .gitignore
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-0>
(3)
- *A* .python-version
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-1>
(1)
- *M* README.rst
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-2>
(75)
- *D* docker/compile_all.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-3>
(89)
- *A* docker/config.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-4>
(7)
- *M* docker/docker_build.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-5>
(8)
- *M* docker/docker_run.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-6>
(31)
- *D* docker/install_dependencies.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-7>
(45)
- *M* docker/labelfusion.dockerfile
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-8>
(109)
- *M* modules/labelfusion/rendertrainingimages.py
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-9>
(4)
- *M* scripts/prepareForObjectAlignment.py
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-10>
(2)
- *M* setup_environment.sh
<https://github.com/RobotLocomotion/LabelFusion/pull/40/files#diff-11>
(6)
Patch Links:
- https://github.com/RobotLocomotion/LabelFusion/pull/40.patch
- https://github.com/RobotLocomotion/LabelFusion/pull/40.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFYQqCllljpJOXpQF3W0zglzJQVNUZjEks5uzT9KgaJpZM4Y1f54>
.
|
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.
Ian, thank you! This is great. Please give us some time to review this. I am happy to upgrade labelfusion to require nvidia-docker2, hopefully most people are ok with this upgrade.
In some of my in-line comments, I asked if you could move some of the bug fixes into their own pull requests. If you don't have time for that, let me know, I can grab your branch and make the PRs myself (when I have some more time :) )
# | ||
|
||
#image_name=robotlocomotion/labelfusion:latest | ||
image_name=ianre657/labelfusion:16.04-latetest |
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.
For this PR, I would like to change the image name back to the official name. I can build the branch and push the new image before landing.
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.
Looks good to me, just change it as you wish.
@@ -1,11 +1,108 @@ | |||
FROM nvidia/cuda:8.0-devel-ubuntu16.04 | |||
FROM ianre657/cuda8gl:latetest |
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.
what is in your image? we'd probably set this to nvidia_cuda_9.0-devel-ubuntu16.04
but could consider ubuntu 18. Is there a reason you depend on the ubuntu version of the labelfusion image?
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.
There exist an issue that nvidia haven't support OpenGL in it's official docker image.
NVIDIA/nvidia-docker#534
and they create another docker image to address this issue, it's called cudagl
.
https://hub.docker.com/r/nvidia/cudagl/
but, you can find out that the version of cuda in cudagl is 9.2, which the most GPUs driver on the market haven't supported for that (9.1 seems to be the mainstream), and if you look inside the dockerfile of nvidia's cudagl(with CUDA9.2), there's also an comment as below.
# CUDA 9.2 is not officially supported on ubuntu 18.04 yet, we use the ubuntu 17.10 repository for CUDA instead.
So I decide to create my own cudagl(CUDA8.0), also.... Can’t come up with the reason why I choose CUDA8.0 rather than9.1.
It's here, I just copy most of the code from cuda8.0 dockerfile and follow the instrucitons from the first link.
https://github.com/ianre657/cuda8gl
|
||
# compile director | ||
#RUN /tmp/build_scripts/compile_director.sh | ||
RUN git clone -b labelFusion-director https://github.com/ianre657/director.git \ |
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.
I have recently added ubuntu18 support to Director, but not landed it in master. Hopefully I can get things up-to-date in Director's master branch, then this PR could be updated to reference that. Are there other changes you put into your fork here?
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's about the dependency of director, apriltags_driver
ianchen-tw/director@a98c56e
the author have update a new version of apriltags_driver
, which fix some bugs
#RUN /tmp/build_scripts/compile_elasticfusion.sh | ||
ARG root_dir=/root | ||
ARG install_dir=/root/install | ||
RUN git clone -b pf-lm-debug-jpeg https://github.com/ianre657/ElasticFusion.git \ |
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.
I see you changed ElasticFusion to your fork, too. What are you fixing in your fork, and what changes are required? Could this fixes to upstream?
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.
The original ElasticFusion use gcc5 to compile the project, it's kind out outdated for 18.04.
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.
also, have fix a function naming typo in ElasticFusion, which have been merged into mp3guy/ElasticFusion
see:
mp3guy/ElasticFusion#149
scripts/prepareForObjectAlignment.py
Outdated
@@ -34,7 +34,7 @@ | |||
lcmlog_filename = dataMap["lcmlog"] | |||
|
|||
# call ElasticFusion | |||
os.system(path_to_ElasticFusion_executable + " -l ./" + lcmlog_filename) | |||
os.system(path_to_ElasticFusion_executable + " -l ./" + lcmlog_filename + " -cal camera.cfg") |
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.
i think this might break existing workflows and data distributions. maybe this script could check if the file exists before adding the -cal
argument?
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.
sounds good.
i will try it later
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.
fixed
hey! @patmarion |
Just adding a note for changes I had to make to get this to work with a GeForce GTX 1650 & Cuda compilation tools, release 8.0, V8.0.61 (from nvcc -V):
|
Conclusion
Bug fix
cdlf
command can work now