| FROM nvidia/cuda:12.2.0-cudnn8-devel-ubuntu22.04 |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| python3 \ |
| python3-pip \ |
| libgl1-mesa-glx \ |
| libglib2.0-0 \ |
| libsm6 \ |
| libxext6 \ |
| libxrender1 \ |
| ffmpeg \ |
| git \ |
| wget \ |
| libicu-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| |
| |
| RUN wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb && \ |
| dpkg -i libicu66_66.1-2ubuntu2_amd64.deb && \ |
| rm libicu66_66.1-2ubuntu2_amd64.deb |
|
|
| |
| RUN git clone --recurse-submodules https://github.com/microsoft/TRELLIS.git . |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN pip install aspose-threed |
|
|
| |
|
|
| |
| RUN DOTNET_ROOT=$(find / -name "libhostfxr.so" 2>/dev/null | head -n 1 | xargs dirname | xargs dirname) && \ |
| echo "DOTNET_ROOT=$DOTNET_ROOT" >> /etc/environment |
|
|
| |
| RUN LIBICU_PATH=$(find / -name "libicu*.so*" 2>/dev/null | head -n 1 | xargs dirname) && \ |
| echo "LD_LIBRARY_PATH=$LIBICU_PATH:$LD_LIBRARY_PATH" >> /etc/environment |
|
|
| |
| ENV SPCONV_ALGO=native |
|
|
| |
| RUN mkdir -p assets/example_image assets/example_multi_image |
|
|
| |
| RUN wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/apple_3.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/avocado_2.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/banana_4.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/buddha_3.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_1.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_2.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/chair_2.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cherries_1.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/dog_1.png \ |
| && wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/hotdog_1.png \ |
| && 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.png |
|
|
| RUN wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_1.png \ |
| && wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_2.png \ |
| && wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_3.png |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "app.py"] |