MinkowskiEngine icon indicating copy to clipboard operation
MinkowskiEngine copied to clipboard

Can't install Minkowski Engine on Docker

Open thiagodma opened this issue 3 years ago • 3 comments

I've been trying to install Minkowski Engine using a Dockerfile for some time now unsuccessfully.

Here's my dockerfile:

FROM pytorch/pytorch:1.9.1-cuda11.1-cudnn8-devel

##############################################
# You should modify this to match your GPU compute capability
# https://developer.nvidia.com/cuda-gpus#compute
# I have a RTX 3070 GPU
ENV TORCH_CUDA_ARCH_LIST="8.6"
##############################################

ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CUDA_HOME=/usr/local/cuda-11.1

# Install dependencies
RUN apt-get update
RUN apt-get install -y git ninja-build cmake build-essential libopenblas-dev \
    xterm xauth openssh-server tmux wget mate-desktop-environment-core

RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

RUN pip install -U git+https://github.com/NVIDIA/MinkowskiEngine -v --no-deps --install-option="--force_cuda" --install-option="--blas=openblas"

Here is the gist with the logs.

thiagodma avatar Feb 27 '22 17:02 thiagodma

Hi @thiagodma - did you ever find a solution to this?

KatherineJames avatar Jul 01 '24 15:07 KatherineJames

I haven't figured out how to get MinkowskiEngine working in Docker

chadrs2 avatar Oct 14 '24 18:10 chadrs2

This worked for me (as part of a project I was working on, so you may not need some of the other deps):

# Use official PyTorch image with CUDA 11.3 support
FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-devel

# Set environment variables
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 6.2 7.0 7.2 7.5 8.0 8.6"
ENV CUDA_HOME=/usr/local/cuda
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
ENV FORCE_CUDA=1

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    git make build-essential libopenblas-dev \
    && rm -rf /var/lib/apt/lists/*

# Install torch-scatter
RUN pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+cu113.html

# Install Detectron2
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git@710e7795d0eeadf9def0e7ef957eea13532e34cf' --no-deps

# Create third_party directory and clone repositories
RUN mkdir /third_party
WORKDIR /third_party

# Install MinkowskiEngine with explicit CUDA paths and build flags
RUN git clone --recursive https://github.com/NVIDIA/MinkowskiEngine \
    && cd MinkowskiEngine \
    && git checkout 02fc608bea4c0549b0a7b00ca1bf15dee4a0b228 \
    && FORCE_CUDA=1 python setup.py install --force_cuda --blas=openblas \
    && cd ..

KatherineJames avatar Oct 15 '24 14:10 KatherineJames