From f55a12d9bc7b45d1efe72fc6618054b9c32553b1 Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:19:09 +0800 Subject: [PATCH 1/7] Create docker setup README.md --- Docker Setup/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Docker Setup/README.md diff --git a/Docker Setup/README.md b/Docker Setup/README.md new file mode 100644 index 0000000..6b00b4a --- /dev/null +++ b/Docker Setup/README.md @@ -0,0 +1,10 @@ +# ISBNet Setup Using Docker + +## 1. Docker Setup + +### Pull the Docker Image + +To pull the Docker image for ISBNet, run the following command: + +```bash +docker pull rayyoh/oneformer3d From 7bb3e89b1d16a8b8866de35a4e03bfc5aa981bef Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:20:07 +0800 Subject: [PATCH 2/7] Update README.md --- Docker Setup/README.md | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Docker Setup/README.md b/Docker Setup/README.md index 6b00b4a..be6c137 100644 --- a/Docker Setup/README.md +++ b/Docker Setup/README.md @@ -1,3 +1,7 @@ +GitHub. + +markdown +Copy code # ISBNet Setup Using Docker ## 1. Docker Setup @@ -8,3 +12,58 @@ To pull the Docker image for ISBNet, run the following command: ```bash docker pull rayyoh/oneformer3d +Clone ISBNet Repository +Clone the ISBNet repository using Git: + +bash +Copy code +git clone https://github.com/VinAIResearch/ISBNet.git +Run Docker Container +Run the Docker container with the appropriate settings. Ensure that you have a GPU enabled for this setup. + +bash +Copy code +docker run --gpus all -it --shm-size=8g --cpus=4 -e PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128 -v C:\Users\Perception-Team\ISBNet:/workspace -p 6008:6008 --name isnbet check +Install Python Requirements Inside the Container +After entering the Docker container, install the required Python dependencies: + +bash +Copy code +pip3 install -r requirements.txt +Build Segmentator Inside Docker +Clone the Segmentator repository and build it inside the Docker container: + +bash +Copy code +git clone https://github.com/Karbo123/segmentator.git +cd segmentator/csrc +mkdir build && cd build +cmake .. \ + -DCMAKE_PREFIX_PATH=`python -c 'import torch; print(torch.utils.cmake_prefix_path)'` \ + -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ + -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ + -DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` +make && make install +Install Additional Dependencies +Install any additional dependencies required for the setup: + +bash +Copy code +apt-get install libsparsehash-dev +Setup PointNet2 +Navigate to the pointnet2 directory inside the ISBNet folder and install it: + +bash +Copy code +cd isbnet/pointnet2 +python3 setup.py bdist_wheel +cd ./dist +pip3 install pointnet2-0.0.0-cp310-cp310-linux_x86_64.whl +Final Build +To complete the final setup and build process, run the following commands: + +bash +Copy code +cd ../../.. +python3 setup.py build_ext develop +By following these steps, you should have ISBNet successfully set up in Docker and ready for use. From c891afe88c416ca4bcbf012fa5cd9ce21639b26d Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:30:51 +0800 Subject: [PATCH 3/7] Update README.md --- Docker Setup/README.md | 78 ++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/Docker Setup/README.md b/Docker Setup/README.md index be6c137..6bef90f 100644 --- a/Docker Setup/README.md +++ b/Docker Setup/README.md @@ -1,69 +1,65 @@ -GitHub. - -markdown -Copy code # ISBNet Setup Using Docker -## 1. Docker Setup +Follow the steps below to set up ISBNet with Docker, including pulling the necessary Docker image, cloning the repository, and installing required dependencies. -### Pull the Docker Image +## 1. Pull the Docker Image -To pull the Docker image for ISBNet, run the following command: +First, pull the Docker image `rayyoh/oneformer3d`: ```bash + docker pull rayyoh/oneformer3d -Clone ISBNet Repository -Clone the ISBNet repository using Git: +``` + +## 2. Clone ISBNet Repository + +```bash +git clone https://github.com/VinAIResearch/ISBNet/tree/master +``` -bash -Copy code -git clone https://github.com/VinAIResearch/ISBNet.git -Run Docker Container -Run the Docker container with the appropriate settings. Ensure that you have a GPU enabled for this setup. +## 3. Run Docker Container -bash -Copy code +```bash docker run --gpus all -it --shm-size=8g --cpus=4 -e PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128 -v C:\Users\Perception-Team\ISBNet:/workspace -p 6008:6008 --name isnbet check -Install Python Requirements Inside the Container -After entering the Docker container, install the required Python dependencies: +``` -bash -Copy code +## 4. Install Python Requirements Inside the container: + +```bash pip3 install -r requirements.txt -Build Segmentator Inside Docker -Clone the Segmentator repository and build it inside the Docker container: +``` +## 5. Build Segmentator Again Inside Docker -bash -Copy code +```bash git clone https://github.com/Karbo123/segmentator.git cd segmentator/csrc mkdir build && cd build cmake .. \ - -DCMAKE_PREFIX_PATH=`python -c 'import torch; print(torch.utils.cmake_prefix_path)'` \ - -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ - -DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` +-DCMAKE_PREFIX_PATH=`python -c 'import torch; print(torch.utils.cmake_prefix_path)'` \ +-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ +-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ +-DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` make && make install -Install Additional Dependencies -Install any additional dependencies required for the setup: + ``` + +## 6. Install libsparsehash-dev -bash -Copy code +```bash apt-get install libsparsehash-dev -Setup PointNet2 -Navigate to the pointnet2 directory inside the ISBNet folder and install it: +``` +## 7. Setup PointNet2 + +```bash -bash -Copy code cd isbnet/pointnet2 python3 setup.py bdist_wheel cd ./dist pip3 install pointnet2-0.0.0-cp310-cp310-linux_x86_64.whl -Final Build -To complete the final setup and build process, run the following commands: +``` +## 8. Final Build -bash -Copy code +```bash cd ../../.. python3 setup.py build_ext develop -By following these steps, you should have ISBNet successfully set up in Docker and ready for use. +``` + From 49b01ccc8731fbd2ded9f7c4d32604441e87a806 Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:32:58 +0800 Subject: [PATCH 4/7] Docker file --- Docker Setup/Dockerfile | 87 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Docker Setup/Dockerfile diff --git a/Docker Setup/Dockerfile b/Docker Setup/Dockerfile new file mode 100644 index 0000000..d855b5f --- /dev/null +++ b/Docker Setup/Dockerfile @@ -0,0 +1,87 @@ +FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel + +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \ + && apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub \ + && apt-get update \ + && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 + +# Install MinkowskiEngine +# Feel free to skip nvidia-cuda-dev if minkowski installation is fine +RUN apt-get update \ + && apt-get -y install libopenblas-dev nvidia-cuda-dev + + +# Install torch-scatter +RUN pip install torch-scatter==2.1.2 -f https://data.pyg.org/whl/torch-1.13.0+cu116.html --no-deps + +# Install ScanNet superpoint segmentator +RUN git clone https://github.com/Karbo123/segmentator.git \ + && cd segmentator/csrc \ + && git reset --hard 76efe46d03dd27afa78df972b17d07f2c6cfb696 \ + && mkdir build \ + && cd build \ + && cmake .. \ + -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` \ + -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ + -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ + -DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` \ + && make \ + && make install \ + && cd ../../.. + +# Install remaining python packages +RUN pip install --no-deps \ + munch \ + pyyaml \ + six \ + tensorboard \ + tensorboardX \ + tqdm \ + imageio \ + setuptools \ + protobuf \ + spconv-cu116==2.3.6 \ + addict==2.4.0 \ + yapf==0.33.0 \ + termcolor==2.3.0 \ + packaging==23.1 \ + numpy==1.24.1 \ + rich==13.3.5 \ + opencv-python==4.7.0.72 \ + pycocotools==2.0.6 \ + Shapely==1.8.5 \ + scipy==1.10.1 \ + terminaltables==3.1.10 \ + numba==0.57.0 \ + llvmlite==0.40.0 \ + pccm==0.4.7 \ + ccimport==0.4.2 \ + pybind11==2.10.4 \ + ninja==1.11.1 \ + lark==1.1.5 \ + cumm-cu116==0.4.9 \ + pyquaternion==0.9.9 \ + lyft-dataset-sdk==0.0.8 \ + pandas==2.0.1 \ + python-dateutil==2.8.2 \ + matplotlib==3.5.2 \ + pyparsing==3.0.9 \ + cycler==0.11.0 \ + kiwisolver==1.4.4 \ + scikit-learn==1.2.2 \ + joblib==1.2.0 \ + threadpoolctl==3.1.0 \ + cachetools==5.3.0 \ + nuscenes-devkit==1.1.10 \ + trimesh==3.21.6 \ + open3d==0.17.0 \ + plotly==5.18.0 \ + dash==2.14.2 \ + plyfile==1.0.2 \ + flask==3.0.0 \ + werkzeug==3.0.1 \ + click==8.1.7 \ + blinker==1.7.0 \ + itsdangerous==2.1.2 \ + importlib_metadata==2.1.2 \ + zipp==3.17.0 \ No newline at end of file From b70c74cefcef1c1b646fe5242cb27c215c4c7e9b Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:34:16 +0800 Subject: [PATCH 5/7] Update Dockerfile for isbnet --- Docker Setup/Dockerfile | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Docker Setup/Dockerfile b/Docker Setup/Dockerfile index d855b5f..e3ce8b0 100644 --- a/Docker Setup/Dockerfile +++ b/Docker Setup/Dockerfile @@ -14,21 +14,6 @@ RUN apt-get update \ # Install torch-scatter RUN pip install torch-scatter==2.1.2 -f https://data.pyg.org/whl/torch-1.13.0+cu116.html --no-deps -# Install ScanNet superpoint segmentator -RUN git clone https://github.com/Karbo123/segmentator.git \ - && cd segmentator/csrc \ - && git reset --hard 76efe46d03dd27afa78df972b17d07f2c6cfb696 \ - && mkdir build \ - && cd build \ - && cmake .. \ - -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` \ - -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ - -DCMAKE_INSTALL_PREFIX=`python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'` \ - && make \ - && make install \ - && cd ../../.. - # Install remaining python packages RUN pip install --no-deps \ munch \ @@ -84,4 +69,4 @@ RUN pip install --no-deps \ blinker==1.7.0 \ itsdangerous==2.1.2 \ importlib_metadata==2.1.2 \ - zipp==3.17.0 \ No newline at end of file + zipp==3.17.0 From 699d2a2a8b64adef41df3a4895a542bfbd1fdcb7 Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:39:12 +0800 Subject: [PATCH 6/7] Update README.md --- Docker Setup/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Docker Setup/README.md b/Docker Setup/README.md index 6bef90f..0831623 100644 --- a/Docker Setup/README.md +++ b/Docker Setup/README.md @@ -63,3 +63,10 @@ cd ../../.. python3 setup.py build_ext develop ``` +### Explanation: +- The **Alternative Method** section provides the user an option to directly download the Dockerfile and skip the manual image pull process. +- You can link to the Dockerfile in your GitHub repository [link](https://github.com/Smith-S-S/ISBNet/blob/master/Docker%20Setup/Dockerfile) and indicate to the user that they can skip the manual `docker pull` command if they choose this method. + + + + From d6e08905b99d5f2c9306b56a56f81eb7c3b36f98 Mon Sep 17 00:00:00 2001 From: Smith-S-S <80092760+Smith-S-S@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:40:22 +0800 Subject: [PATCH 7/7] Update README.md --- Docker Setup/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docker Setup/README.md b/Docker Setup/README.md index 0831623..d9515c3 100644 --- a/Docker Setup/README.md +++ b/Docker Setup/README.md @@ -63,6 +63,7 @@ cd ../../.. python3 setup.py build_ext develop ``` +## Todo ### Explanation: - The **Alternative Method** section provides the user an option to directly download the Dockerfile and skip the manual image pull process. - You can link to the Dockerfile in your GitHub repository [link](https://github.com/Smith-S-S/ISBNet/blob/master/Docker%20Setup/Dockerfile) and indicate to the user that they can skip the manual `docker pull` command if they choose this method.