ZoneMaestro_code / eval /DiffuScene /build_chamfer.sh
kkkkiiii's picture
Add files using upload-large-folder tool
e5487a0 verified
#!/bin/bash
# Script to build ChamferDistance CUDA extensions
# This script sets the correct CUDA path to avoid version mismatch errors
set -e # Exit on error
# Set CUDA 12.9 as the compiler
export CUDA_HOME=/usr/local/cuda-12.9
export CUDA_PATH=/usr/local/cuda-12.9
export PATH=/usr/local/cuda-12.9/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.9/lib64:$LD_LIBRARY_PATH
echo "Building ChamferDistance CUDA extensions with CUDA 12.9..."
echo "============================================================"
# Build chamfer3D
echo ""
echo "Building chamfer3D..."
cd ChamferDistancePytorch/chamfer3D
python setup.py build_ext --inplace
echo "✓ chamfer3D built successfully"
# Build chamfer2D
echo ""
echo "Building chamfer2D..."
cd ../chamfer2D
python setup.py build_ext --inplace
echo "✓ chamfer2D built successfully"
# Build chamfer5D
echo ""
echo "Building chamfer5D..."
cd ../chamfer5D
python setup.py build_ext --inplace
echo "✓ chamfer5D built successfully"
echo ""
echo "============================================================"
echo "All ChamferDistance extensions built successfully!"
echo "============================================================"