Spaces:
Running
on
Zero
Running
on
Zero
Create Dockerfile
Browse files- Dockerfile +60 -0
Dockerfile
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:12.2.0-cudnn8-devel-ubuntu22.04
|
2 |
+
|
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 \
|
10 |
+
libgl1-mesa-glx \
|
11 |
+
libglib2.0-0 \
|
12 |
+
libsm6 \
|
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 |
+
|
24 |
+
# Install Python dependencies
|
25 |
+
COPY requirements.txt .
|
26 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
27 |
+
|
28 |
+
# Install aspose.threed
|
29 |
+
RUN pip install aspose-threed
|
30 |
+
|
31 |
+
# Set environment variable
|
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 (from the GitHub repository)
|
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 \
|
41 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/buddha_3.png \
|
42 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_1.png \
|
43 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cat_2.png \
|
44 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/chair_2.png \
|
45 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/cherries_1.png \
|
46 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/dog_1.png \
|
47 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/hotdog_1.png \
|
48 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/mushroom_1.png \
|
49 |
+
&& wget -P assets/example_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_image/soccer_1.png
|
50 |
+
|
51 |
+
RUN wget -P assets/example_multi_image https://raw.githubusercontent.com/trellis3d/trellis/main/assets/example_multi_image/chair_1.png \
|
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 |
+
|
59 |
+
# Command to run the application
|
60 |
+
CMD ["python", "app.py"]
|