Skip to content

Error while running from docker components #170

@viktorho

Description

@viktorho

I’m encountering an import error when running the project inside Docker, even though everything works correctly on my local environment.

Error Traceback:

Traceback (most recent call last):
  File "/workspace/threedgut_tracer/tracer.py", line 40, in load_3dgut_plugin
    from . import lib3dgut_cc as tdgut  # type: ignore
ImportError: cannot import name 'lib3dgut_cc' from 'threedgut_tracer' (/workspace/threedgut_tracer/__init__.py)

What I tried:

Notes:

  • The error only occurs inside Docker.
  • Running the exact same code locally works fine.
  • Docker image contains the compiled project, but Docker cannot find lib3dgut_cc.

Expected behavior:

Docker environment should import lib3dgut_cc the same way as local environment.

Actual behavior:

Docker cannot find or load lib3dgut_cc, resulting in ImportError.

Request:

Could you help confirm whether this is a build-path or packaging issue with the compiled lib3dgut_cc inside Docker? Or is there an additional step needed during Docker build to properly include the compiled extension?

Thanks!

Full log:

(0): error 1: cannot open file '/workspace/threedgut_tracer/include/3dgut/threedgut.slang'.
Error executing job with overrides: ['path=/workspace/data/treestrials', 'out_dir=/workspace/runs/treestrials', 'experiment_name=treestrials_3dgut', 'export_usdz.enabled=true', 'dataset.downsample_factor=2', 'num_workers=6']
Traceback (most recent call last):
  File "/workspace/threedgut_tracer/tracer.py", line 40, in load_3dgut_plugin
    from . import lib3dgut_cc as tdgut  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'lib3dgut_cc' from 'threedgut_tracer' (/workspace/threedgut_tracer/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/train.py", line 50, in main
    trainer = Trainer3DGRUT(conf)
              ^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/3dgrut/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/workspace/threedgrut/trainer.py", line 129, in __init__
    self.init_model(conf, self.scene_extent)
  File "/workspace/threedgrut/trainer.py", line 188, in init_model
    self.model = MixtureOfGaussians(conf, scene_extent=scene_extent)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/threedgrut/model/model.py", line 189, in __init__
    self.renderer = threedgut_tracer.Tracer(conf)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/threedgut_tracer/tracer.py", line 292, in __init__
    load_3dgut_plugin(conf)
  File "/workspace/threedgut_tracer/tracer.py", line 44, in load_3dgut_plugin
    setup_3dgut(conf)
  File "/workspace/threedgut_tracer/setup_3dgut.py", line 112, in setup_3dgut
    subprocess.check_call(
  File "/opt/conda/envs/3dgrut/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['slangc', '-target', 'cuda', '-I', '/workspace/threedgut_tracer/include', '-I', '/workspace/threedgut_tracer/../threedgrt_tracer/include', '-line-directive-mode', 'none', '-matrix-layout-row-major', '-Wno-41018', '-O2', '-DPARTICLE_RADIANCE_NUM_COEFFS=16', '-DGAUSSIAN_PARTICLE_KERNEL_DEGREE=2', '-DGAUSSIAN_PARTICLE_MIN_KERNEL_DENSITY=0.0113', '-DGAUSSIAN_PARTICLE_MIN_ALPHA=0.00392156862745098', '-DGAUSSIAN_PARTICLE_MAX_ALPHA=0.99', '-DGAUSSIAN_MIN_TRANSMITTANCE_THRESHOLD=0.0001', '-DGAUSSIAN_ENABLE_HIT_COUNT=true', '-DGAUSSIAN_N_ROLLING_SHUTTER_ITERATIONS=5', '-DGAUSSIAN_K_BUFFER_SIZE=0', '-DGAUSSIAN_GLOBAL_Z_ORDER=true', '-DFINE_GRAINED_LOAD_BALANCING=false', '-DGAUSSIAN_UT_ALPHA=1.0', '-DGAUSSIAN_UT_BETA=2.0', '-DGAUSSIAN_UT_KAPPA=0.0', '-DGAUSSIAN_UT_DELTA=1.7320508075688772', '-DGAUSSIAN_UT_IN_IMAGE_MARGIN_FACTOR=0.1', '-DGAUSSIAN_UT_REQUIRE_ALL_SIGMA_POINTS_VALID=false', '-DGAUSSIAN_RECT_BOUNDING=true', '-DGAUSSIAN_TIGHT_OPACITY_BOUNDING=true', '-DGAUSSIAN_TILE_BASED_CULLING=true', '/workspace/threedgut_tracer/include/3dgut/threedgut.slang', '-o', '/root/.cache/torch_extensions/py311_cu128/lib3dgut_cc/threedgutSlang.cuh']' returned non-zero exit status 255.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions