NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.35k stars 144 forks source link

Read-only file system #33

Closed Spandan-Madan closed 3 years ago

Spandan-Madan commented 3 years ago

I installed nvdiffrast using a docker image from dockerhub (https://hub.docker.com/r/rgabdullin/nvdiffrast_docker) and am trying to run the included sample (cube.py). When running the sample I get the error OSError: [Errno 30] Read-only file system despite specifying an output directory with the --outdir flag. Below is the error stack:

File "cube.py", line 200, in <module>
    main()
  File "cube.py", line 182, in main
    fit_cube(
  File "cube.py", line 76, in fit_cube
    glctx = dr.RasterizeGLContext()
  File "/opt/conda/lib/python3.8/site-packages/nvdiffrast/torch/ops.py", line 151, in __init__
    self.cpp_wrapper = _get_plugin().RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/opt/conda/lib/python3.8/site-packages/nvdiffrast/torch/ops.py", line 84, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts, extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 993, in load
    build_directory or _get_build_directory(name, verbose),
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1478, in _get_build_directory
    os.makedirs(build_directory, exist_ok=True)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 2 more times]
  File "/opt/conda/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/om2'

Any suggestions for what might have gone wrong?

Spandan-Madan commented 3 years ago

Solution: Figured that the cpp extensions used a disk which wasn't visible to my container. After making it visible the issue got resolved - closing the issue!