marieai / marie-ai

Integrate AI-powered Document Analysis Pipelines
MIT License
60 stars 5 forks source link

No working C++ compiler found in torch._inductor.config.cpp.cxx: (None, 'g++') #94

Open gregbugaj opened 11 months ago

gregbugaj commented 11 months ago

Describe the bug While running marie container `3.0.22-cpu' we get in the logs.

[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] due to: 
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] Traceback (most recent call last):
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING]   File "/opt/venv/lib/python3.10/site-packages/torch/_inductor/codecache.py", line 438, in cpp_compiler_search
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING]     raise exc.InvalidCxxCompiler()
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] InvalidCxxCompiler: No working C++ compiler found in torch._inductor.config.cpp.cxx: (None, 'g++')
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] 
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] 
[2023-11-29 22:29:33,093] torch._dynamo.convert_frame: [WARNING] 

process completes but it looks like we are not compiling the models.

Describe how you solve it N/A

fuseraft commented 11 months ago

Is g++ installed in the container? Also this torch issue might be related.

You could also try setting the TORCH_INDUCTOR_INSTALL_GXX environment variable and pytorch inductor will try to install gcc (along with g++) using conda.

gregbugaj commented 11 months ago

I do have g++ installed in container. I will check out details on the task referenced.

Rithsek99 commented 10 months ago

Is this still an issue? I built and ran 3.10-cpu and it worked fine.