Kshitizbansal / pointillism_rp_net

Official code base for RP-net from pointillism paper
6 stars 3 forks source link

Implementation of the Code #3

Open hregmi77 opened 1 year ago

hregmi77 commented 1 year ago

Hello, Thank you for sharing the code. Could you please share more details on implementation? It throws issues while building the iou3d libraries. Also, what version of torchvision was used, if any? Cuda 10.1 and torch 1.4 with appropriate torchvision can not be installed. If you could share the requirements of the project, that would be great. Thank you!

John1001Song commented 1 month ago

plz check my docker file


FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04

# Set up environment variables for non-interactive installations
ENV DEBIAN_FRONTEND=noninteractive

# Update and install necessary packages
RUN apt-get update && yes | apt-get upgrade
RUN apt-get install -y wget pkg-config

# Additional package installations
ENV APT_INSTALL="apt-get install -y --no-install-recommends"

RUN apt-get update && $APT_INSTALL \
    build-essential \
    cmake \
    git \
    openssh-client \
    curl \
    vim-gtk \
    tmux \
    zip \
    unzip \
    ca-certificates \
    libjpeg-dev \
    libopenexr-dev \
    libpng-dev \
    sudo

# Python and pip installations
RUN $APT_INSTALL python3 python3-pip python3-dev python3-tk python3-pil.imagetk python3-setuptools

# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O Miniconda3-latest-Linux-x86_64.sh && \
    bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
    rm Miniconda3-latest-Linux-x86_64.sh

# Set conda path
ENV PATH=/opt/conda/bin:$PATH

# Initialize conda and create environment
RUN /opt/conda/bin/conda init bash && \
    /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda create -y --name myenv python=3.9"

# Activate conda environment and install PyTorch
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && \
    conda activate myenv && \
    conda install -y pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch"

# Upgrade pip and install additional Python packages
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && \
    conda activate myenv && \
    python -m pip install --upgrade pip && \
    python -m pip install \
    opencv-python \
    scikit-image \
    matplotlib \
    imageio \
    black \
    isort \
    comet_ml \
    scikit-learn \
    pandas \
    transforms3d"

# Copy the build and install script into the image
# COPY build_and_install.sh /pointillism/build_and_install.sh

# Ensure the build and install script has executable permissions
# RUN chmod +x /pointillism/build_and_install.sh

# Set the entry point to run the build and install script
ENTRYPOINT ["/pointillism/build_and_install.sh"]

you may uninstall all the cuda and python from your system

then change the iou3d source code update the two cpp files iou3d.cpp and roipool3d.cpp, where ".data" should be ".data_ptr" and "AT_CHECK" should be "TORCH_CHECK" then, try the install in build_and_install.sh