Skip to content

Instantly share code, notes, and snippets.

@naruya
Last active September 11, 2022 15:48
Show Gist options
  • Save naruya/c3c7ba87932e88556ef7c2a76502bf07 to your computer and use it in GitHub Desktop.
Save naruya/c3c7ba87932e88556ef7c2a76502bf07 to your computer and use it in GitHub Desktop.
instant-NGP
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
# zsh
RUN apt-get update && apt-get install -y wget git zsh
SHELL ["/bin/zsh", "-c"]
RUN wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
RUN sed -i "s/# zstyle ':omz:update' mode disabled/zstyle ':omz:update' mode disabled/g" ~/.zshrc
# python
RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3.9-venv python3-pip
RUN ln -s /usr/bin/python3.9 /usr/bin/python
# vnc
RUN apt-get update && apt-get install -y xvfb x11vnc icewm
RUN echo 'alias vnc="export DISPLAY=:0; Xvfb :0 -screen 0 1400x900x24 &; x11vnc -display :0 -forever -noxdamage > /dev/null 2>&1 &; icewm-session &"' >> /root/.zshrc
# instant-ngp
RUN apt-get update && apt-get install -y build-essential libopenexr-dev libxi-dev \
libglfw3-dev libglew-dev libomp-dev libxinerama-dev libxcursor-dev
RUN export PATH="/usr/local/cuda-11.3/bin:$PATH"
RUN export LD_LIBRARY_PATH="/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH"
RUN python -m venv /root/venv/insngp
RUN source ~/venv/insngp/bin/activate && \
pip install -U pip && \
pip install cmake && \
pip install -r https://raw.githubusercontent.com/NVlabs/instant-ngp/master/requirements.txt
# utils
RUN apt-get update && apt-get install -y vim ffmpeg
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /root
CMD ["zsh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment