Spaces:
Paused
Paused
Download Dockerfile from theglobe1/Direct3D-S2: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/spaces/theglobe1/Direct3D-S2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/theglobe1/Direct3D-S2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/theglobe1/Direct3D-S2/resolve/main/Dockerfile
1.99 kB
| # Direct3D-S2 shape only (Uniboards 2026-11-20). Docker Space; GPU: L40S 48 GB (1024 resolution needs ~24 GB+ peak). | |
| FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 \ | |
| TORCH_CUDA_ARCH_LIST="8.9" FORCE_CUDA=1 MAX_JOBS=1 CUDA_HOME=/usr/local/cuda | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3.10 python3.10-dev python3-pip git build-essential ninja-build libsparsehash-dev \ | |
| libgl1 libglib2.0-0 libxrender1 libxext6 && rm -rf /var/lib/apt/lists/* && \ | |
| ln -sf /usr/bin/python3.10 /usr/bin/python && python -m pip install --upgrade pip wheel setuptools | |
| RUN pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cu121 | |
| RUN pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl | |
| RUN pip install numpy==1.26.4 scikit-image trimesh omegaconf tqdm huggingface_hub einops transformers==4.40.2 \ | |
| diffusers==0.31.0 triton==3.1.0 pymeshfix pyvista igraph timm kornia cython fast-simplification==0.1.7 \ | |
| gradio==5.34.2 "git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8" | |
| RUN git clone https://github.com/mit-han-lab/torchsparse.git /opt/torchsparse && cd /opt/torchsparse && \ | |
| git checkout 385f5ce8718fcae93540511b7f5832f4e71fd835 && pip install --no-build-isolation . | |
| RUN git clone https://github.com/DreamTechAI/Direct3D-S2.git /opt/d3s2 && cd /opt/d3s2 && \ | |
| git checkout a1cf235b2881cff04a91900060a9546b40e7ee5d && \ | |
| pip install --no-build-isolation -e . && cd third_party/voxelize && pip install --no-build-isolation . | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user HF_HOME=/home/user/.cache/huggingface TORCH_HOME=/home/user/.cache/torch \ | |
| GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 | |
| WORKDIR /home/user/app | |
| COPY --chown=user app.py . | |
| CMD ["python", "app.py"] | |