Spaces:
Running
on
Zero
Running
on
Zero
Update Dockerfile
Browse files- Dockerfile +21 -5
Dockerfile
CHANGED
@@ -3,7 +3,7 @@ FROM nvidia/cuda:12.2.0-cudnn8-devel-ubuntu22.04
|
|
3 |
# Set a working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
# Install system dependencies
|
7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
8 |
python3 \
|
9 |
python3-pip \
|
@@ -13,11 +13,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
13 |
libxext6 \
|
14 |
libxrender1 \
|
15 |
ffmpeg \
|
16 |
-
libicu-dev \
|
17 |
git \
|
18 |
wget \
|
|
|
19 |
&& rm -rf /var/lib/apt/lists/*
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# Clone the repository with submodules
|
22 |
RUN git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git .
|
23 |
|
@@ -28,13 +35,23 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
28 |
# Install aspose.threed
|
29 |
RUN pip install aspose-threed
|
30 |
|
31 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
ENV SPCONV_ALGO=native
|
33 |
|
34 |
# Create assets directories
|
35 |
RUN mkdir -p assets/example_image assets/example_multi_image
|
36 |
|
37 |
-
# Download example images
|
38 |
RUN wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/apple_3.png \
|
39 |
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/avocado_2.png \
|
40 |
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/banana_4.png \
|
@@ -52,7 +69,6 @@ RUN wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis
|
|
52 |
&& wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_2.png \
|
53 |
&& wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_3.png
|
54 |
|
55 |
-
|
56 |
# Expose the Gradio port
|
57 |
EXPOSE 7860
|
58 |
|
|
|
3 |
# Set a working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Install system dependencies, including libicu-dev AND a specific older version
|
7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
8 |
python3 \
|
9 |
python3-pip \
|
|
|
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.
|
24 |
+
RUN 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.deb
|
27 |
+
|
28 |
# Clone the repository with submodules
|
29 |
RUN git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git .
|
30 |
|
|
|
35 |
# Install aspose.threed
|
36 |
RUN pip install aspose-threed
|
37 |
|
38 |
+
# --- .NET and Library Path Configuration ---
|
39 |
+
|
40 |
+
# 1. Find the .NET root directory (dynamically)
|
41 |
+
RUN DOTNET_ROOT=$(find / -name "libhostfxr.so" 2>/dev/null | head -n 1 | xargs dirname | xargs dirname) && \
|
42 |
+
echo "DOTNET_ROOT=$DOTNET_ROOT" >> /etc/environment
|
43 |
+
|
44 |
+
# 2. Find the libicu.so file (dynamically, could be libicu66!) and add to LD_LIBRARY_PATH
|
45 |
+
RUN 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/environment
|
47 |
+
|
48 |
+
# Set environment variable for spconv
|
49 |
ENV SPCONV_ALGO=native
|
50 |
|
51 |
# Create assets directories
|
52 |
RUN mkdir -p assets/example_image assets/example_multi_image
|
53 |
|
54 |
+
# Download example images
|
55 |
RUN 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 \
|
|
|
69 |
&& wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_2.png \
|
70 |
&& wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_3.png
|
71 |
|
|
|
72 |
# Expose the Gradio port
|
73 |
EXPOSE 7860
|
74 |
|