-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Update dockerfile.gpu #6452
Closed
Closed
Update dockerfile.gpu #6452
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
This is not correct.
lib_lightgbm.so
has already been compiled a few lines up (the line runningcmake --build build
), so--precompile
is necessary to build a Python package bundling it in.Using
--gpu
makes that previous compilation unnecessary... and will not use the same OpenCL library and headers that was passed there.This should be reverted.
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.
Get it. I'll try to work with it today if I have spare time and ckeck everything one more time.
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.
If I turn back to
--precompile
I got this errors: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.
That error suggests to me that you're passing
{"device": "cuda"}
through parameters. That isn't appropriate for this image, where the library hasn't been built with-DUSE_CUDA=1
.In this Dockerfile,
lib_lightgbm
is being built only with-DUSE_GPU=1
, which means you'd need to pass{"device": "gpu"}
through params.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've tried different versions of building like
cmake -DUSE_GPU=1
orcmake -DUSE_CUDA=1
, and then in the installation command, I also tried all possible variants:sh ./build-python.sh install --gpu
,sh ./build-python.sh install --cuda
, andsh ./build-python.sh install --precompile
as well. I even found your reply on StackOverflow and tried to change some installation steps, but it still didn't work.The good news is that I fixed the missing files and driver in the Docker image, so now we just need to figure out how to install it properly :)
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.
@jameslamb, @shiyu1994, Today I decide to install it with simple pip command like
pip install --no-binary lightgbm --config-settings=cmake.define.USE_CUDA=ON 'lightgbm>=4.0.0'
and after run code withdevice: cuda
, I get already known error from this issue. This gave me an idea that promblem with instalation from the sorce can be inside thebuild-python.sh
orcmakelists.txt
files. I ask you to get look at this if you canThere 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 difficult for me to help you because you're reporting error messages but not showing the code you ran the led to them.
This Dockerfile is about the
-DUSE_GPU
version of LightGBM (OpenCL-based), not the-DUSE_CUDA
version (CUDA kernels). Please keep it that way.Stop passing
-DUSE_CUDA
or using{"device": "cuda"}
with images built from this Dockerfile.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.
@NisuSan are you still interested in working on this?
If you don't have the time / interest right now please tell us, so we can close this and someone else can work on fixing this Dockerfile.