Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error about SIBR_viewer #37

Open
boxuLibrary opened this issue Mar 17, 2024 · 10 comments
Open

error about SIBR_viewer #37

boxuLibrary opened this issue Mar 17, 2024 · 10 comments

Comments

@boxuLibrary
Copy link

hello, it's an excellent work. However, when I compile the render tools in the SIBR_viewer, I encounter a problem that I can not find the torch. Do you know how I can solve this problem? Thank you so much.

Screenshot from 2024-03-17 20-23-34

@tongji-rkr
Copy link
Collaborator

You need to download and configure libtorch(1.10) and choose the correct version according to your build mode (Debug or Release).

@tongji-rkr
Copy link
Collaborator

After downloading, compile according to the following process https://github.com/city-super/Scaffold-GS/tree/main/SIBR_viewers

@boxuLibrary
Copy link
Author

Thanks, are there instructions for Linux? Because I am not familiar with windows.

@boxuLibrary
Copy link
Author

When I run the original Gaussian Splatting, there is no similar problem. So I think the problem may be the Cmakelists?

@tongji-rkr
Copy link
Collaborator

Due to equipment reasons, we have not compiled it in linux before, but we will improve the Linux instructions in the near future.

@tongji-rkr
Copy link
Collaborator

Also, we figure out the cause of the problem. We'll work it out as soon as possible.

@RuiZ-18
Copy link

RuiZ-18 commented May 17, 2024

Hello! have you already figure out the linux version? I meet the same problem, and I've tried for a long time.

@bro-sin
Copy link

bro-sin commented Jul 13, 2024

I met the same error and this could be solved appropriately using this compile command:

Torch_DIR=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release

if you have installed the pytorch package.

I encounter another problem that:

undefined reference to `cv::imread(std::string const&, int)'

image

I compiler this viewer using the following Dockerfile:

ARG CUDA_VERSION=11.7.1
ARG OS_VERSION=22.04
#编译viewers的时候需要使用CUDNN
ARG CUDNN_VERSION=8
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${OS_VERSION} as baseimage 

# Set environment variables.
## Set non-interactive to prevent asking for user inputs blocking image creation.
ENV DEBIAN_FRONTEND=noninteractive
## Set timezone as it is required by some packages.
ENV TZ=Asia/Shanghai
## CUDA Home, required to find CUDA in some packages.
ENV CUDA_HOME="/usr/local/cuda"

#换源
RUN sed -i "s/archive.ubuntu.com/mirrors.cqu.edu.cn/g" /etc/apt/sources.list \
    && sed -i "s/security.ubuntu.com/mirrors.cqu.edu.cn/g" /etc/apt/sources.list

#安装必要的软件
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    curl \
    git \
    build-essential \
    cmake \
    && rm -rf /var/lib/apt/lists/*

FROM baseimage as buildimage
#安装依赖
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    libglew-dev \
    libassimp-dev \
    libboost-all-dev \
    libgtk-3-dev \
    libopencv-dev \
    libglfw3-dev \
    libavdevice-dev \
    libavcodec-dev \
    libeigen3-dev \
    libxxf86vm-dev \
    libembree-dev \
    && rm -rf /var/lib/apt/lists/*

# 安装python以及python包
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    python3-dev \
    python3-pip \
    python-is-python3 \
    && rm -rf /var/lib/apt/lists/*
#换源
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
#安装torch
RUN pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 \
    -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

#添加源码
COPY . /sibr_core

#开始编译
WORKDIR /sibr_core

#设置环境变量,编译的时候会用到torch相关的库
# Variables used at build time.
ARG TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX"

# cmake这一步会下载extlibs,与编译分开,便于进去调试
RUN mkdir build \
    && Torch_DIR=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` \
    cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release
RUN  cmake --build build --target install

ENTRYPOINT [ "/sibr_core/install/bin/SIBR_gaussianViewer_app" ]

# how to build:
# docker build -t sibr_viewer:cudnn8-scaffold-gs -f docker/Dockerfile .

@tongji-rkr
Copy link
Collaborator

You can try to add -D_GLIBCXX_USE_CXX11_ABI=1 or -D_GLIBCXX_USE_CXX11_ABI=0 to your command.

@bro-sin
Copy link

bro-sin commented Jul 14, 2024

You can try to add -D_GLIBCXX_USE_CXX11_ABI=1 or -D_GLIBCXX_USE_CXX11_ABI=0 to your command.

I tried both options, but neither worked. Additionally, when I added the option, the following warning appeared:

CMake Warning:
  Manually-specified variables were not used by the project:

    _GLIBCXX_USE_CXX11_ABI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants