Closed aldipiroli closed 11 months ago
Hi @aldipiroli , thanks for your interest and efforts in integrating TorchSparse to docker containers.
For the first method (building from source), since the source code of TorchSparse 2.1.0 is currently undergoing internal quality checks, it is not available for use yet. The code you are using is not v2.1.0.
For the second method, the undefined symbol
error is likely caused by using a Pytorch version that is not in our support matrix.
One possible solution is to reinstall PyTorch through pip install torch==2.0.1 --force-reinstall
in your docker container and then use python -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)"
to install torchsparse
.
Alternatively, you can try pulling a different PyTorch docker image to solve the problem. Below is a sample dockerfile that you can try:
FROM pytorch/pytorch:latest
ENV DEBIAN_FRONTEND=noninteractive
# ======================================================================
# Update and Install Tools
# ======================================================================
RUN apt-get update -y \
&& apt-get install -y build-essential \
&& apt-get install -y apt-transport-https gnupg software-properties-common meld vim ninja-build libboost-dev sudo nvtop \
&& apt-get install -y apt-utils git gitk curl ca-certificates bzip2 tree htop wget zsh\
&& apt-get install -y openexr libopenexr-dev \
&& apt-get install -y libsparsehash-dev \
&& rm -rf /var/lib/apt/lists/
# ======================================================================
# Install torchsparse
# ======================================================================
RUN pip install --upgrade pip
RUN FORCE_CUDA=1 python -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)"
@ys-2020 thank you very much for your answer! The minimal docker example works well. When final code is published I'll try again to install it in the NVIDIA docker, and if needed open a PR.
Is there an existing issue for this?
Have you followed all the steps in the FAQ?
Current Behavior
I am trying to install
torchsparse v2.1.0
inside a docker container, specifically the NVIDIA pytorch containers.Unfortunately, so I was not successful in installing it. However, I believe it might be useful also to other people to have an official docker container with
torchsparse
installed.Here is what I tried so far.
Installing from soruce: The Dockerfile:
docker build -t torchsparse .
Installing from the pre-build wheels:
The Dockerfile, using nvcr.io/nvidia/pytorch:22.08-py3, which has
pytorch==1.13
andCUDA 11.7.1
:docker build -t torchsparse .
undefined symbol
error when using the installation scriptpython -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)"
torch2.1cu12.1
,torch2.1cu12.0
,torch1.13cu11.7
, ... . All yield to similar errors.Do you have any suggestion on how I can proceed?
Error Line
First method:
Second method:
Environment
Full Error Log
Error Log
[PUT YOUR ERROR LOG HERE]