manurare / 360monodepth

Code release for 360monodepth. With our framework we achieve monocular depth estimation for high resolution 360° images based on aligning and blending perspective depth maps.
https://manurare.github.io/360monodepth/
MIT License
159 stars 33 forks source link

Docker Environment problem #4

Closed jiayaozhang closed 2 years ago

jiayaozhang commented 2 years ago

Hi, nice to see your interesting work

I have problems to run your docker environment on Ubuntu 20.04 and Windows 10

Can you help to test whether the docker environment is valid or not

Thanks a lot !

manurare commented 2 years ago

Hi,

Which errors do you have?

jiayaozhang commented 2 years ago

Screenshot from 2022-07-24 22-32-37

Attached my errors.

I found the solution from here. And here need your help to modify the docker environment

https://stackoverflow.com/questions/39518377/docker-build-unable-to-fetch-archives

Screenshot from 2022-07-24 22-34-47

manurare commented 2 years ago

If you add that line to the Dockerfile does it work?

jiayaozhang commented 2 years ago

I change the docker file to

#-- setup building environment RUN apt-get update && \ apt-get install -y wget && \ rm -rf /var/lib/apt/lists

Attached the results I have got

Screenshot from 2022-07-25 18-29-00

manurare commented 2 years ago

I tried docker build -t 360monodepth . with Docker version 20.10.16 and it works fine with me. You might need to delete the last two lines of the Dockerfile. It is not required anymore as there is no test script in the most recent version of the repo

# 3) run test script
RUN cd /monodepth/python/src/test && python3 ./test_depthmapAlign_module.py --task 1
jiayaozhang commented 2 years ago

ok

Docker runs successfully!

Got the problem

It was because the VPN problem

jiayaozhang commented 2 years ago

But after I got the docker, I still can not run it.

docker run -it --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 360monodepth "cd /monodepth/python/src; python main.py --expname test_experiment --blending_method all --grid_size 8x7"

I can not run on host machine and docker

And there is not python inside image..

I have never heard NVIDIA_VISIBLE_DEVICES, is this CUDA_VISIBLE_DEVICES?

manurare commented 2 years ago

No, NVIDIA_VISIBLE_DEVICES is a command specific to docker. If you have a version of Docker >=19.03 you can use this other option as an alternative to NVIDIA_VISIBLE_DEVICES

And there is not python inside image..

This is weird. In the Dockerfile this line should install python.

RUN apt install --no-install-recommends \
        libpython3-dev \
        python3-pip -y

Which error are you actually getting?

jiayaozhang commented 2 years ago

Now I made the codes running successful !

Attach my modifications

  1. inside the docker pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html Looking in links: https://download.pytorch.org/whl/torch_stable.html

  2. python3 main.py not python main.py

  3. sudo docker run -it -v /home/janice/Documents/360monodepth/data:/data --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 360monodepth

4.Add torch.hub._validate_not_a_forked_repo=lambda a,b,c: True

in the depthmap_utils.py line 183 before midas = torch.*******************

After running I got this result

My question is Screenshot from 2022-08-02 17-18-49

How I can get the depth images from panorama images not the comparision matrix.txt

Thanks !

for exapmle, the how to make the figure and run plot_figure.py?

jiayaozhang commented 2 years ago

I got the results here!