1 Star 2 Fork 0

OpenXRLab / xrnerf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
DockerfileCN 2.78 KB
一键复制 编辑 原始数据 按行查看 历史
ZZL 提交于 2023-01-30 17:30 . fix formatting issues (#27)
ARG PYTORCH="1.9.0"
ARG CUDA="11.1"
ARG CUDNN="8"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-key del 7fa2af80
ADD docker/sources.list /etc/apt/
# RUN apt-get update && apt-get install -y --no-install-recommends wget --assume-yes apt-utils
# RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
# RUN dpkg -i cuda-keyring_1.0-1_all.deb
RUN apt-get update && \
apt-get install git ninja-build ffmpeg libsm6 libxext6 vim -y -f && \
apt-get install build-essential -y && \
apt-get install wget -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install torch1.10 and mmcv-full
RUN wget https://download.pytorch.org/whl/cu111/torch-1.10.0%2Bcu111-cp37-cp37m-linux_x86_64.whl
RUN pip install torch-1.10.0+cu111-cp37-cp37m-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip cache purge && rm torch-1.10.0+cu111-cp37-cp37m-linux_x86_64.whl
RUN pip install opencv-python>=3 yapf imageio scikit-image -i https://pypi.doubanio.com/simple && \
pip cache purge
RUN pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10.0/index.html && \
pip cache purge
RUN pip install coverage pytest -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip cache purge
# Install neural-body needed pkgs
RUN pip install spconv-cu111 -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip cache purge
RUN pip install lpips trimesh matplotlib smplx -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip cache purge
RUN git clone https://gitclone.com/github.com/facebookresearch/pytorch3d.git
RUN cd pytorch3d && pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple && \
pip cache purge
# Install tcnn
# (If meet network problem, commented below out, download & install manually)
RUN git clone https://gitclone.com/github.com/nvlabs/tiny-cuda-nn
RUN cd tiny-cuda-nn/dependencies && git clone https://gitclone.com/github.com/fmtlib/fmt.git
RUN cd tiny-cuda-nn/dependencies && git clone https://gitclone.com/github.com/NVIDIA/cutlass.git
RUN cd tiny-cuda-nn/bindings/torch && python setup.py install
# gitclone收录日,家祭无忘告乃翁
# 0907 update:已收录,以下取消注释
RUN git clone https://gitclone.com/github.com/openxrlab/xrnerf.git
RUN cd xrnerf/extensions/mesh_grid && python setup.py install
RUN cd xrnerf/extensions/ngp_raymarch && python setup.py build_ext --inplace && python setup.py install
# 运行ut验证安装
RUN cd xrnerf && coverage run --source xrnerf/models -m pytest -s test/models && coverage report -m
1
https://gitee.com/OpenXRLab/xrnerf.git
git@gitee.com:OpenXRLab/xrnerf.git
OpenXRLab
xrnerf
xrnerf
main

搜索帮助