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
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1-labs
# docker buildx create --name gpubuilder --driver-opt "image=moby/buildkit:buildx-stable-1-gpu" --bootstrap
# docker buildx --builder gpubuilder build --allow device -t trellis --load .
FROM nvidia/cuda:12.9.1-cudnn-devel-ubuntu22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y g++ git cmake ninja-build \
python3 python-is-python3 python3-pip python3-venv sudo
RUN git clone -b main https://github.com/microsoft/TRELLIS.2.git --recursive
# create venv instead of conde (see --new-env in setup.sh)
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install -U wheel setuptools pip
RUN pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124
WORKDIR /TRELLIS.2
ARG TORCH_CUDA_ARCH_LIST="8.0"
RUN --device=nvidia.com/gpu bash -c ". ./setup.sh --basic --flash-attn --nvdiffrast --nvdiffrec --cumesh --o-voxel --flexgemm"
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"]
6 changes: 3 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ if [ "$NEW_ENV" = true ] ; then
fi

if [ "$BASIC" = true ] ; then
pip install imageio imageio-ffmpeg tqdm easydict opencv-python-headless ninja trimesh transformers gradio==6.0.1 tensorboard pandas lpips zstandard
pip install imageio imageio-ffmpeg tqdm easydict opencv-python-headless ninja trimesh transformers gradio==6.0.1 tensorboard pandas lpips zstandard plyfile psutil
pip install git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
sudo apt install -y libjpeg-dev
sudo apt install -y libjpeg-dev libwebp-dev
pip install pillow-simd
pip install kornia timm
fi

if [ "$FLASHATTN" = true ] ; then
if [ "$PLATFORM" = "cuda" ] ; then
pip install flash-attn==2.7.3
pip install flash-attn==2.7.3 --no-build-isolation
elif [ "$PLATFORM" = "hip" ] ; then
echo "[FLASHATTN] Prebuilt binaries not found. Building from source..."
mkdir -p /tmp/extensions
Expand Down