From 527803909a81a75fce3d6513f9e3dd280ee51ab8 Mon Sep 17 00:00:00 2001 From: maxiuw <39929933+maxiuw@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:42:22 +0100 Subject: [PATCH 1/3] Create docke_torch2c18.Dockerfile --- docker/docke_torch2c18.Dockerfile | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docker/docke_torch2c18.Dockerfile diff --git a/docker/docke_torch2c18.Dockerfile b/docker/docke_torch2c18.Dockerfile new file mode 100644 index 000000000..dd89412c5 --- /dev/null +++ b/docker/docke_torch2c18.Dockerfile @@ -0,0 +1,56 @@ +``` +FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 + + +ENV PYTHONUNBUFFERED=1 +ENV FORCE_CUDA="1" +ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" +ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all" + +# SYSTEM +RUN apt-get update --yes --quiet && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ + software-properties-common \ + build-essential apt-utils \ + wget curl vim git ca-certificates kmod \ + && rm -rf /var/lib/apt/lists/* +RUN apt-get update +RUN apt-get install ffmpeg libsm6 libxext6 -y +# PYTHON 3.10 +RUN add-apt-repository --yes ppa:deadsnakes/ppa +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN apt install -y g++-11 +RUN apt install -y gcc-11 +RUN apt install -y libsparsehash-dev +RUN apt-get update --yes --quiet +RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ + python3.10 \ + python3.10-dev \ + python3.10-distutils \ + python3.10-lib2to3 \ + python3.10-gdbm \ + python3.10-tk \ + pip + +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 999 \ + && update-alternatives --config python3 && ln -s /usr/bin/python3 /usr/bin/python + +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 + + + +RUN pip3 install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cu118 + + + +RUN pip3 install opencv-python==4.7.0.68 +RUN pip3 install llvmlite numba tensorboardX easydict pyyaml scikit-image tqdm SharedArray open3d mayavi av2 kornia==0.6.5 pyquaternion +RUN pip3 install spconv-cu118 + +WORKDIR /usr/local/ +COPY . PTv3_Det +WORKDIR /usr/local/PTv3_Det +RUN pip3 install -r requirements.txt + +# next, run docker and +# python3 setup.py develop +``` From b1afdf3d146792f90b988507013f1331186d4e60 Mon Sep 17 00:00:00 2001 From: maxiuw <39929933+maxiuw@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:42:37 +0100 Subject: [PATCH 2/3] Rename docke_torch2c18.Dockerfile to docker_torch2c18.Dockerfile --- .../{docke_torch2c18.Dockerfile => docker_torch2c18.Dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docker/{docke_torch2c18.Dockerfile => docker_torch2c18.Dockerfile} (100%) diff --git a/docker/docke_torch2c18.Dockerfile b/docker/docker_torch2c18.Dockerfile similarity index 100% rename from docker/docke_torch2c18.Dockerfile rename to docker/docker_torch2c18.Dockerfile From 8e5c8c1833f76761c2582fbbbaa2ec112c469133 Mon Sep 17 00:00:00 2001 From: maxiuw <39929933+maxiuw@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:46:52 +0100 Subject: [PATCH 3/3] additional description and workdir rename --- docker/docker_torch2c18.Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/docker_torch2c18.Dockerfile b/docker/docker_torch2c18.Dockerfile index dd89412c5..b0173df40 100644 --- a/docker/docker_torch2c18.Dockerfile +++ b/docker/docker_torch2c18.Dockerfile @@ -46,9 +46,10 @@ RUN pip3 install opencv-python==4.7.0.68 RUN pip3 install llvmlite numba tensorboardX easydict pyyaml scikit-image tqdm SharedArray open3d mayavi av2 kornia==0.6.5 pyquaternion RUN pip3 install spconv-cu118 +# remember you pull the whole repo before that and run docker build ... from OpenPCDet, not Docker folder or tools WORKDIR /usr/local/ -COPY . PTv3_Det -WORKDIR /usr/local/PTv3_Det +COPY . OpenPCDet +WORKDIR /usr/local/OpenPCDet RUN pip3 install -r requirements.txt # next, run docker and