Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**__pycache__
.vscode
CLAUDE.md
.polyscope.ini
.venv/

external/
runs/
Expand All @@ -18,9 +20,7 @@ utils/ngc/grid_search_configs
imgui.ini
data

thirdparty/simple-knn/build
thirdparty/simple-knn/dist
thirdparty/simple-knn/simple_knn.egg-info
thirdparty/kaolin/

threedgrt_tracer/.ninja_log
threedgrt_tracer/include/3dgrt/kernels/slang/*.cuh*
Expand All @@ -34,3 +34,8 @@ results/
thirdparty/ncore/

playground/assets/

assets/nvidia-hq.gif
assets/playground_glass.gif

uv.lock
65 changes: 1 addition & 64 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,70 +26,7 @@ jobs:
run: pip install black==26.3.1 isort==5.13.0

- name: Check code style
run: bash formatter.sh --check

ci-legacy:
name: ci-legacy (CUDA ${{ matrix.cuda_version }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
cuda_version:
- "11.8.0"
- "12.8.1"

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# when set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
gcc-11 g++-11 \
git \
libglib2.0-0

- name: Install conda
run: |
curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ~/miniconda.sh -b -p /opt/conda
rm ~/miniconda.sh
/opt/conda/bin/conda install -y python=${PYTHON_VERSION}
/opt/conda/bin/conda clean -ya
echo "/opt/conda/bin" >> $GITHUB_PATH
env:
PYTHON_VERSION: "3.11"

- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install 3dgrut including all dependencies
run: |
git config --global --add safe.directory "$(pwd)"
./install_env.sh 3dgrut WITH_GCC11
env:
CUDA_VERSION: ${{ matrix.cuda_version }}

- name: Smoketest - python train.py --help # better (smoke) testing requires a GPU
run: |
conda run -n 3dgrut python train.py --help
run: bash scripts/formatter.sh --check

ci-uv:
name: ci-uv (CUDA ${{ matrix.cuda_version }} Ubuntu ${{ matrix.ubuntu_version }})
Expand Down
72 changes: 34 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
FROM ubuntu:24.04
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG CUDA_VERSION=11.8.0
ENV CUDA_VERSION=${CUDA_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated ca-certificates \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
wget git \
curl \
build-essential \
gcc-11 g++-11 \
libgl1-mesa-dev \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
ARG CUDA_VERSION=12.8.1
ARG UBUNTU_VERSION=24.04

RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_25.1.1-2-Linux-x86_64.sh && \
bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install -y python=${PYTHON_VERSION} && \
/opt/conda/bin/conda clean -ya
ENV PATH=/opt/conda/bin:$PATH
RUN conda init
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}

ENV CUDA_VERSION=${CUDA_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility
ENV EGL_PLATFORM=surfaceless
ENV XDG_DATA_HOME="/usr/local/share/uv"
ENV XDG_BIN_HOME="/usr/local/bin"
ENV UV_INSTALL_DIR="/usr/local/bin"
ENV UV_SYSTEM_PYTHON=1
ENV FORCE_CUDA=1

# # Make sure TORCH_CUDA_ARCH_LIST matches the pytorch wheel setting.
# # Reference: https://github.com/pytorch/pytorch/blob/main/.ci/manywheel/build_cuda.sh#L54
# #
# # (cuda11) $ python -c "import torch; print(torch.version.cuda, torch.cuda.get_arch_list())"
# # 11.8 ['sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_37', 'sm_90', 'compute_37']
# #
# # (cuda12) $ python -c "import torch; print(torch.version.cuda, torch.cuda.get_arch_list())"
# # 12.8 ['sm_75', 'sm_80', 'sm_86', 'sm_90', 'sm_100', 'sm_120', 'compute_120']
# #
# RUN if [ "$CUDA_VERSION" = "11.8.0" ]; then \
# echo 'export TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;9.0"' >> /etc/profile.d/cuda_arch.sh; \
# elif [ "$CUDA_VERSION" = "12.8.1" ]; then \
# echo 'export TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0;10.0;12.0"' >> /etc/profile.d/cuda_arch.sh; \
# fi
RUN apt-get update && \
apt-get install -y --allow-unauthenticated ca-certificates && \
apt-get install -y -qq --no-install-recommends build-essential \
wget git curl libgl1-mesa-dev libglib2.0-0 && \
rm -rf /var/lib/apt/lists/*

RUN curl -LsSf https://astral.sh/uv/install.sh | sh

WORKDIR /workspace
COPY . .
RUN bash ./install_env_uv.sh

RUN CUDA_VERSION=$CUDA_VERSION bash ./install_env.sh 3dgrut WITH_GCC11
RUN echo "conda activate 3dgrut" >> ~/.bashrc
RUN echo "source $(pwd)/.venv/bin/activate" >> ~/.bashrc
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,11 @@ source .venv/bin/activate

### Building and Running with Docker

To build the Docker image:
```sh
docker build --build-arg CUDA_VERSION=12.8.1 -t 3dgrut:cuda128 .
```

Build the Docker image:
```bash
git clone --recursive https://github.com/nv-tlabs/3dgrut.git
cd 3dgrut
docker build . -t 3dgrut
```sh
docker build --build-arg CUDA_VERSION=12.8.1 -t 3dgrut:cuda12 .
docker build --build-arg CUDA_VERSION=11.8.0 --build-arg UBUNTU_VERSION=22.04 -t 3dgrut:cuda11 .
docker buildx build --platform linux/amd64,linux/arm64 --build-arg CUDA_VERSION=13.0.2 -t 3dgrut:cuda13 .
```

Run it:
Expand Down
185 changes: 0 additions & 185 deletions install_env.ps1

This file was deleted.

Loading
Loading