Spaces:
Build error
Build error
bennyguo
commited on
Commit
•
8817d21
1
Parent(s):
d286ae5
switch to docker
Browse files- Dockerfile +60 -0
- README.md +2 -4
- pre-requirements.txt +0 -5
- requirements.txt +0 -1
Dockerfile
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Reference:
|
2 |
+
# https://github.com/cvpaperchallenge/Ascender
|
3 |
+
# https://github.com/nerfstudio-project/nerfstudio
|
4 |
+
|
5 |
+
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
6 |
+
|
7 |
+
ARG USER_NAME=dreamer
|
8 |
+
ARG GROUP_NAME=dreamers
|
9 |
+
ARG UID=1000
|
10 |
+
ARG GID=1000
|
11 |
+
|
12 |
+
# Set compute capability for nerfacc and tiny-cuda-nn
|
13 |
+
# See https://developer.nvidia.com/cuda-gpus and limit number to speed-up build
|
14 |
+
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX"
|
15 |
+
ENV TCNN_CUDA_ARCHITECTURES=90;89;86;80;75;70;61;60
|
16 |
+
# Speed-up build for RTX 30xx
|
17 |
+
# ENV TORCH_CUDA_ARCH_LIST="8.6"
|
18 |
+
# ENV TCNN_CUDA_ARCHITECTURES=86
|
19 |
+
# Speed-up build for RTX 40xx
|
20 |
+
# ENV TORCH_CUDA_ARCH_LIST="8.9"
|
21 |
+
# ENV TCNN_CUDA_ARCHITECTURES=89
|
22 |
+
|
23 |
+
ENV CUDA_HOME=/usr/local/cuda
|
24 |
+
ENV PATH=${CUDA_HOME}/bin:/home/${USER_NAME}/.local/bin:${PATH}
|
25 |
+
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
26 |
+
ENV LIBRARY_PATH=${CUDA_HOME}/lib64/stubs:${LIBRARY_PATH}
|
27 |
+
|
28 |
+
# apt install by root user
|
29 |
+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
30 |
+
build-essential \
|
31 |
+
curl \
|
32 |
+
git \
|
33 |
+
libegl1-mesa-dev \
|
34 |
+
libgl1-mesa-dev \
|
35 |
+
libgles2-mesa-dev \
|
36 |
+
libglib2.0-0 \
|
37 |
+
libsm6 \
|
38 |
+
libxext6 \
|
39 |
+
libxrender1 \
|
40 |
+
python-is-python3 \
|
41 |
+
python3.10-dev \
|
42 |
+
python3-pip \
|
43 |
+
wget \
|
44 |
+
&& rm -rf /var/lib/apt/lists/*
|
45 |
+
|
46 |
+
# Change user to non-root user
|
47 |
+
RUN groupadd -g ${GID} ${GROUP_NAME} \
|
48 |
+
&& useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME}
|
49 |
+
USER ${USER_NAME}
|
50 |
+
|
51 |
+
RUN pip install --upgrade pip setuptools ninja
|
52 |
+
RUN pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118
|
53 |
+
# Install nerfacc and tiny-cuda-nn before installing requirements.txt
|
54 |
+
# because these two installations are time consuming and error prone
|
55 |
+
RUN pip install git+https://github.com/KAIR-BAIR/nerfacc.git@v0.5.2
|
56 |
+
RUN pip install git+https://github.com/NVlabs/tiny-cuda-nn.git#subdirectory=bindings/torch
|
57 |
+
|
58 |
+
COPY requirements.txt /tmp
|
59 |
+
RUN cd /tmp && pip install -r requirements.txt
|
60 |
+
WORKDIR /home/${USER_NAME}/threestudio
|
README.md
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: ⚡
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
-
sdk:
|
7 |
-
sdk_version: 3.35.2
|
8 |
-
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
11 |
---
|
|
|
1 |
---
|
2 |
+
title: threestudio
|
3 |
emoji: ⚡
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
+
sdk: docker
|
|
|
|
|
7 |
pinned: false
|
8 |
license: apache-2.0
|
9 |
---
|
pre-requirements.txt
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
ninja
|
2 |
-
--extra-index-url https://download.pytorch.org/whl/cu113
|
3 |
-
torch==1.12.1+cu113
|
4 |
-
torchvision==0.13.1+cu113
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -38,4 +38,3 @@ git+https://github.com/openai/CLIP.git
|
|
38 |
|
39 |
#controlnet
|
40 |
controlnet_aux
|
41 |
-
|
|
|
38 |
|
39 |
#controlnet
|
40 |
controlnet_aux
|
|