Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Conversation

@timmh
Copy link

@timmh timmh commented Aug 30, 2020

This PR adds a Dockerfile (and .dockerignore). The image can be built using docker build -t consistent_depth ..
An example invokation is:

docker run --rm --gpus all \
    -v $INPUT_DIR:/opt/consistent_depth/input \
    -v $OUTPUT_DIR:/opt/consistent_depth/output \
    consistent_depth python main.py \
    --video_file input/ayush.mp4 --path output --make_video

Please let me know if I should add some documentation to the readme.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2020
@mattclifford1
Copy link

mattclifford1 commented Sep 21, 2020

I've noticed that this uses cuda 10.2. Does this work with colmap and the pytorch dependency used (torch==1.4.0+cu100)? I'm happy to test things on my machine also if you need.

@timmh
Copy link
Author

timmh commented Sep 21, 2020

I've noticed that this uses cuda 10.2. Does this work with colmap and the pytorch dependency used (torch==1.4.0+cu100)? I'm happy to test things on my machine also if you need.

Yes, it does work, you can test it by running the commands above.

@Makio64
Copy link

Makio64 commented Aug 4, 2021

Hi,
I got this error when I execute the image :

ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['python', 'main.py', '--video_file', 'input/ayush.mp4', '--path', 'output', '--make_video']' command failed.  (See above for error)
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from params import Video3dParamsParser
  File "/opt/consistent_depth/params.py", line 6, in <module>
    from monodepth.depth_model_registry import get_depth_model, get_depth_model_list
  File "/opt/consistent_depth/monodepth/depth_model_registry.py", line 5, in <module>
    from .mannequin_challenge_model import MannequinChallengeModel
  File "/opt/consistent_depth/monodepth/mannequin_challenge_model.py", line 10, in <module>
    from .mannequin_challenge.models import pix2pix_model
ModuleNotFoundError: No module named 'monodepth.mannequin_challenge.models'

@timmh
Copy link
Author

timmh commented Aug 4, 2021

@Makio64 this may happen if the monodepth git submodules are missing. Please make sure to git clone --recursive initially or git submodule update --init --recursive in your existing git repo, then rebuild the docker image

Copy link

@roxanneluo roxanneluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed the test and it works.

@BarRozenman
Copy link

BarRozenman commented May 26, 2022

I tried to use the docker file on mu system but i get:

Traceback (most recent call last):
  File "main.py", line 13, in <module>
    dp.process(params)
  File "/opt/consistent_depth/process.py", line 117, in process
    return self.pipeline(params)
  File "/opt/consistent_depth/process.py", line 60, in pipeline
    ft.save_depth(initial_depth_dir)
  File "/opt/consistent_depth/depth_fine_tuning.py", line 190, in save_depth
    depth = self.model.forward(stacked_images, metadata)
  File "/opt/consistent_depth/monodepth/depth_model.py", line 23, in forward
    depth = self.estimate_depth(images)
  File "/opt/consistent_depth/monodepth/mannequin_challenge_model.py", line 60, in estimate_depth
    self.model.prediction_d, _ = self.model.netG.forward(images)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/consistent_depth/monodepth/mannequin_challenge/models/hourglass.py", line 176, in forward
    pred_feature = self.seq(input_)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/container.py", line 100, in forward
    input = module(input)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 345, in forward
    return self.conv2d_forward(input, self.weight)
  File "/opt/miniconda/envs/consistent_depth/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 342, in conv2d_forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

when running:


sudo docker run --gpus all -it --entrypoint /bin/bash\
 -v /mydata/consistent_depth:/mnt/  consistentdepth

and then inside the docker terminal:

conda run -n consistent_depth python main.py     --video_file input/vid1_snippet.mp4 --path output --make_video

my system:
Ubuntu 18.02
GPU: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
I have installed NVIDIA Container Toolkit (https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
and I successfully run CUDA on other docker containers

did anyone stable across this issue? please help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants