Skip to content

Commit

Permalink
init codes
Browse files Browse the repository at this point in the history
  • Loading branch information
19reborn committed Aug 13, 2023
0 parents commit 778fd62
Show file tree
Hide file tree
Showing 2,718 changed files with 927,237 additions and 0 deletions.
92 changes: 92 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
FROM nvidia/cuda:10.2-devel-ubuntu18.04

ENV COLMAP_VERSION=3.7
ENV CMAKE_VERSION=3.21.0
ENV PYTHON_VERSION=3.7.0
ENV OPENCV_VERSION=4.5.5.62
ENV CERES_SOLVER_VERSION=2.0.0

RUN echo "Installing apt packages..." \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt -y update --no-install-recommends \
&& apt -y install --no-install-recommends \
git \
wget \
ffmpeg \
tk-dev \
libxi-dev \
libc6-dev \
libbz2-dev \
libffi-dev \
libomp-dev \
libssl-dev \
zlib1g-dev \
libcgal-dev \
libgdbm-dev \
libglew-dev \
python3-dev \
python3-pip \
qtbase5-dev \
checkinstall \
libglfw3-dev \
libeigen3-dev \
libgflags-dev \
libxrandr-dev \
libopenexr-dev \
libsqlite3-dev \
libxcursor-dev \
build-essential \
libcgal-qt5-dev \
libxinerama-dev \
libboost-all-dev \
libfreeimage-dev \
libncursesw5-dev \
libatlas-base-dev \
libqt5opengl5-dev \
libgoogle-glog-dev \
libsuitesparse-dev \
python3-setuptools \
libreadline-gplv2-dev \
&& apt autoremove -y \
&& apt clean -y \
&& export DEBIAN_FRONTEND=dialog

RUN echo "Installing Python ver. ${PYTHON_VERSION}..." \
&& cd /opt \
&& wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz \
&& tar xzf Python-${PYTHON_VERSION}.tgz \
&& cd ./Python-${PYTHON_VERSION} \
&& ./configure --enable-optimizations \
&& make \
&& checkinstall

COPY ./requirements.txt ./

RUN echo "Installing pip packages..." \
&& python3 -m pip install -U pip \
&& pip3 --no-cache-dir install -r ./requirements.txt \
&& pip3 --no-cache-dir install cmake==${CMAKE_VERSION} opencv-python==${OPENCV_VERSION} \
&& rm ./requirements.txt

RUN echo "Installing Ceres Solver ver. ${CERES_SOLVER_VERSION}..." \
&& cd /opt \
&& git clone https://github.com/ceres-solver/ceres-solver \
&& cd ./ceres-solver \
&& git checkout ${CERES_SOLVER_VERSION} \
&& mkdir ./build \
&& cd ./build \
&& cmake ../ -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF \
&& make -j \
&& make install

RUN echo "Installing COLMAP ver. ${COLMAP_VERSION}..." \
&& cd /opt \
&& git clone https://github.com/colmap/colmap \
&& cd ./colmap \
&& git checkout ${COLMAP_VERSION} \
&& mkdir ./build \
&& cd ./build \
&& cmake ../ \
&& make -j \
&& make install \
&& colmap -h
18 changes: 18 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## VS Code Dev Container

> Basic dev container for running Instant Neural Graphics Primitives without GUI.
### Requirements

- #### **[Docker](https://www.docker.com/get-started)**

- #### **[VS Code](https://code.visualstudio.com/Download)**

- #### **[Docker VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)**

### How to build

```sh
cmake -DNGP_BUILD_WITH_GUI=off ./ -B ./build
cmake --build build --config RelWithDebInfo -j 16
```
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Instant NGP Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "instant-ngp",
"workspaceFolder": "/volume",
"shutdownAction": "stopCompose",
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"mutantdino.resourcemonitor",
"ms-azuretools.vscode-docker",
"nvidia.nsight-vscode-edition"
]
}
26 changes: 26 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.8"

services:
instant-ngp:
image: instantngp:latest
build:
context: ..
dockerfile: ./.devcontainer/Dockerfile
stdin_open: true
tty: true
environment:
NVIDIA_DRIVER_CAPABILITIES: compute,utility,graphics
DISPLAY: $DISPLAY
volumes:
- ../:/volume
- /tmp/.X11-unix:/tmp/.X11-unix
working_dir: /volume
command: /bin/bash
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
106 changes: 106 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build_linux:
name: Build on linux systems
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
cuda: "11.3"
arch: 86
- os: ubuntu-18.04
cuda: "10.2"
arch: 75
- os: ubuntu-18.04
cuda: "10.2"
arch: 70
- os: ubuntu-18.04
cuda: "10.2"
arch: 61
- os: ubuntu-18.04
cuda: "10.2"
arch: 53
- os: ubuntu-18.04
cuda: "10.2"
arch: 37
env:
build_dir: "build"
config: "Release"
TCNN_CUDA_ARCHITECTURES: ${{ matrix.arch }}
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install build-essential python3-dev libglfw3-dev libglew-dev libxinerama-dev libxcursor-dev libxi-dev
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install CUDA
env:
cuda: ${{ matrix.cuda }}
run: ./dependencies/cuda-cmake-github-actions/scripts/actions/install_cuda_ubuntu.sh
shell: bash
- name: CMake
run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}
- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --target all --verbose -j `nproc`


build_windows:
name: Build on Windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 86
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 75
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 70
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 61
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 53
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
arch: 37
env:
build_dir: "build"
config: "Release"
TCNN_CUDA_ARCHITECTURES: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install CUDA
env:
cuda: ${{ matrix.cuda }}
visual_studio: ${{ matrix.visual_studio }}
shell: powershell
run: .\dependencies\cuda-cmake-github-actions\scripts\actions\install_cuda_windows.ps1
- name: CMake
run: cmake . -B ${{ env.build_dir }} -G "${{ matrix.visual_studio }}" -A x64
- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --config ${{ env.config }} --target ALL_BUILD --verbose
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/.vscode
/.vs
/build*
/figures
/out
/results
/tmp
/venv
/video
/*.json
*.msgpack
*.training
*.out
__pycache__
.DS_Store
imgui.ini
output
teaser_scripts/

*.ply
*.obj
*.pkl

scripts.sh
CMakeFiles

*.pkl
*.ply
data/*.obj
data/test_smpl.json
data/dtu_ngp
*.sh
*.log

core.*
*.txt
.nfs*
9qMvoD
mA6vX7
McQ2lW

*.png
*.gif
24 changes: 24 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[submodule "dependencies/pybind11"]
path = dependencies/pybind11
url = https://github.com/Tom94/pybind11
[submodule "dependencies/eigen"]
path = dependencies/eigen
url = https://github.com/Tom94/eigen
[submodule "dependencies/glfw"]
path = dependencies/glfw
url = https://github.com/Tom94/glfw
[submodule "dependencies/args"]
path = dependencies/args
url = https://github.com/Taywee/args
[submodule "dependencies/tinylogger"]
path = dependencies/tinylogger
url = https://github.com/Tom94/tinylogger
[submodule "dependencies/imgui"]
path = dependencies/imgui
url = https://github.com/ocornut/imgui.git
[submodule "dependencies/dlss"]
path = dependencies/dlss
url = https://github.com/NVIDIA/DLSS
[submodule "dependencies/neus2_tcnn"]
path = dependencies/neus2_tcnn
url = https://github.com/19reborn/NeuS2_TCNN.git
2 changes: 2 additions & 0 deletions AnacondaBat.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%windir%\System32\cmd.exe "/K" D:\Programs\anaconda3\Scripts\activate.bat pytorch

Loading

0 comments on commit 778fd62

Please sign in to comment.