yuchen0187/Point-SAM
11
1FROM nvidia/cuda:12.1.1-devel-ubuntu20.042ENV NVIDIA_VISIBLE_DEVICES ${NVIDIA_VISIBLE_DEVICES:-all}3ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics4 5ARG PYTHON_VERSION=3.106 7# Install os-level packages8RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \9 bash-completion \10 build-essential \11 ca-certificates \12 cmake \13 curl \14 git \15 htop \16 libegl1 \17 libxext6 \18 libjpeg-dev \19 libpng-dev \20 rsync \21 tmux \22 unzip \23 vim \24 wget \25 xvfb \26 && rm -rf /var/lib/apt/lists/*27 28# Install (mini) conda29RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \30 chmod +x ~/miniconda.sh && \31 ~/miniconda.sh -b -p /opt/conda && \32 rm ~/miniconda.sh && \33 /opt/conda/bin/conda init && \34 /opt/conda/bin/conda install -y python="$PYTHON_VERSION" && \35 /opt/conda/bin/conda clean -ya36 37ENV PATH /opt/conda/bin:$PATH38SHELL ["/bin/bash", "-c"]39 40RUN pip install \41 numpy==1.26.4 \42 scipy \43 ninja \44 torch==2.1.2 \45 torchvision==0.16.2 \46 h5py \47 matplotlib \48 "trimesh>=4.2.0" \49 "pyglet<2" \50 "accelerate>=0.28.0" \51 wandb \52 timm \53 datasets \54 hydra-core \55 && pip cache purge56 57RUN FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST="6.0;7.0;7.5;8.0;8.6;9.0" pip install "git+https://github.com/Jiayuan-Gu/torkit3d.git@235ecf60497271136f5552cb45bb7cf75ab1cb09" && pip cache purge58 59# Install apex60RUN git clone --single-branch https://github.com/NVIDIA/apex && \61 cd apex && git checkout 810ffae374a2b9cb4b5c5e28eaeca7d7998fca0c && \62 pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ && pip cache purge && \63 cd .. && rm -rf apex64 65RUN useradd -m -u 1000 user66 67WORKDIR /app68 69RUN pip install git+https://github.com/zyc00/Point-SAM.git && pip cache purge70RUN pip install flask flask_cors && pip cache purge71 72COPY --chown=user . /app73 74RUN wget https://yuchen-service.nrp-nautilus.io/yuchen_fast/pointcloud-sam/pretrained/ours/mixture_10k/model-2.safetensors75 76CMD [ "python3", "app.py", "--host=0.0.0.0", "--port=7860"]