From 1afffdd839c6cfb73c4fe364769e7c3ea33bfbdd Mon Sep 17 00:00:00 2001 From: Kevin Bloch Date: Fri, 20 Jan 2023 08:04:54 +0100 Subject: [PATCH 1/3] Dockerfile added --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..5fa7bfcc0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:18.04 +#RUN rm /bin/sh && ln -s /bin/bash /bin/sh +#RUN apt update && apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 +RUN apt update && apt install pip + +#FROM continuumio/miniconda3 +FROM continuumio/anaconda3 + +RUN conda create -n py36 python=3.6 anaconda +#RUN source ~/anaconda3/etc/profile.d/conda.sh +#RUN conda init bash +RUN activate py36 + +RUN conda install -n py36 pytorch=0.4.1 torchvision=0.2.1 -c pytorch +RUN conda install -n py36 opencv=3.3.1 + +RUN pip install tensorboardX==1.4 + +RUN apt install git + +RUN git clone https://github.com/nianticlabs/monodepth2.git + +#RUN source activate py36 From c0e7f2d4b027e1305eba290f71eb395d934f95aa Mon Sep 17 00:00:00 2001 From: Kevin Bloch Date: Fri, 20 Jan 2023 08:10:59 +0100 Subject: [PATCH 2/3] Update Dockerfile --- Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5fa7bfcc0..aade3c5ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,10 @@ FROM ubuntu:18.04 -#RUN rm /bin/sh && ln -s /bin/bash /bin/sh -#RUN apt update && apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 -RUN apt update && apt install pip -#FROM continuumio/miniconda3 +RUN apt update && apt install pip git + FROM continuumio/anaconda3 RUN conda create -n py36 python=3.6 anaconda -#RUN source ~/anaconda3/etc/profile.d/conda.sh -#RUN conda init bash RUN activate py36 RUN conda install -n py36 pytorch=0.4.1 torchvision=0.2.1 -c pytorch @@ -16,8 +12,15 @@ RUN conda install -n py36 opencv=3.3.1 RUN pip install tensorboardX==1.4 -RUN apt install git RUN git clone https://github.com/nianticlabs/monodepth2.git +RUN mkdir /images + +# how to use: + +# docker build . -t monodepth2 +# docker run --rm -it --entrypoint=/bin/bash -v ~/your_image_folder_path:/images monodepth2 -#RUN source activate py36 +# then, inside docker container: +# source activate py36 +# python test_simple.py --image_path ../images/your_image.jpg --model_name mono+stereo_640x192 From 71b1fdcc7eafd3cf9bc5d45ffa0494f43b67f9c7 Mon Sep 17 00:00:00 2001 From: Kevin Bloch Date: Fri, 20 Jan 2023 08:11:25 +0100 Subject: [PATCH 3/3] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index aade3c5ca..f633ee5e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,5 @@ RUN mkdir /images # then, inside docker container: # source activate py36 +# cd monodepth2 # python test_simple.py --image_path ../images/your_image.jpg --model_name mono+stereo_640x192