CoolFace
Apppublic

arabago96/Ai_spatial_modeling

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
1likes
Dockerfile79 linesDownload Raw Back to root
1FROM nvidia/cuda:12.2.0-cudnn8-devel-ubuntu22.042 3# Set a working directory4WORKDIR /app5 6# Install system dependencies, including libicu-dev AND a specific older version7RUN apt-get update && apt-get install -y --no-install-recommends \8    python3 \9    python3-pip \10    libgl1-mesa-glx \11    libglib2.0-0 \12    libsm6 \13    libxext6 \14    libxrender1 \15    ffmpeg \16    git \17    wget \18    libicu-dev \19    && rm -rf /var/lib/apt/lists/*20 21# Install a compatible libicu version.  We'll try libicu66 first, as suggested.22# If that doesn't work, we might need libicu70, libicu71, or others.23# This is the CRITICAL FIX based on the Aspose forum post.24RUN wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb && \25    dpkg -i libicu66_66.1-2ubuntu2_amd64.deb && \26    rm libicu66_66.1-2ubuntu2_amd64.deb27 28# Clone the repository with submodules29RUN git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git .30 31# Install Python dependencies32COPY requirements.txt .33RUN pip install --no-cache-dir -r requirements.txt34 35# Install aspose.threed36RUN pip install aspose-threed37 38# --- .NET and Library Path Configuration ---39 40# 1. Find the .NET root directory (dynamically)41RUN DOTNET_ROOT=$(find / -name "libhostfxr.so" 2>/dev/null | head -n 1 | xargs dirname | xargs dirname) && \42    echo "DOTNET_ROOT=$DOTNET_ROOT" >> /etc/environment43 44# 2. Find the libicu.so file (dynamically, could be libicu66!) and add to LD_LIBRARY_PATH45RUN LIBICU_PATH=$(find / -name "libicu*.so*" 2>/dev/null | head -n 1 | xargs dirname) && \46    echo "LD_LIBRARY_PATH=$LIBICU_PATH:$LD_LIBRARY_PATH" >> /etc/environment47 48# Set environment variable for spconv49ENV SPCONV_ALGO=native50 51# Create assets directories52RUN mkdir -p assets/example_image assets/example_multi_image53 54# Download example images55RUN wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/apple_3.png \56    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/avocado_2.png \57    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/banana_4.png \58    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/buddha_3.png \59    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_1.png \60    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_2.png \61    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/chair_2.png \62    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cherries_1.png \63    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/dog_1.png \64    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/hotdog_1.png \65    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/mushroom_1.png \    && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/soccer_1.png66 67# Bake BiRefNet model into the image (prevents slow runtime download)68COPY download_models.py .69RUN python3 download_models.py70 71RUN wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_1.png \72    && wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_2.png \73    && wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_3.png74 75# Expose the Gradio port76EXPOSE 786077 78# Command to run the application79CMD ["python", "app.py"]