Closed GeeCastro closed 3 years ago
This typically happens from creating a CUDA context before forking which is not allowed. Are you importing cudf
in the top level somewhere in your application?
It worked with the small example above, thanks! I'll see if I can make sure we only load the cudf in that function for our project... If it's not an option, I guess I'll have to find a way to initialise cuda manually within that function?
It worked with the small example above, thanks! I'll see if I can make sure we only load the cudf in that function for our project... If it's not an option, I guess I'll have to find a way to initialise cuda manually within that function?
Importing cudf
by default runs some code to validate things like driver version, toolkit version, device capability, etc. and this code initializes CUDA. You can bypass this by setting the environment variable: CUDF_NO_INITIALIZE
or RAPIDS_NO_INITIALIZE
setting export RAPIDS_NO_INITIALIZE=True
worked, indeed. Thanks again! I guess it'll just initialise in a lazy fashion when the actual functions are called?
Describe the bug rapids.ai throws a
cudaErrorInitializationError
when used in a celery worker.Steps/Code to reproduce bug
from python interpreter
It throws the following error on the celery worker.
Expected behavior load the dataframe without crashing. It works fine if not used with celery.
Environment overview (please complete the following information)
Environment details Please run and paste the output of the
cudf/print_env.sh
script here, to gather any other relevant environment details cat env.txtClick here to see environment details
Additional context We get this problem from version 0.14. Setting
--pool solo
in celery worker fixes it but is not something we want. It may mean that the error is related to child process not being initialised correctly... It could be because the cuda init happens before celery actually starts the child process.