# Build timeout when starting space

**URL:** <https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992>\
**Category:** Beginners\
**Created:** [August 16, 2023, 5:00pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992 "2023-08-16T17:00:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilmendoza](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/neilmendoza/32/18612_2.png) [@neilmendoza](https://discuss.huggingface.co/u/neilmendoza)\
**Post date:** [August 16, 2023, 5:00pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/1 "2023-08-16T17:00:41Z")

</div>

Hi, I duplicated [threestudio - a Hugging Face Space by bennyguo](https://huggingface.co/spaces/bennyguo/threestudio). I’ve tried to start it a couple of times and it always ends with…

# Build error

## Build timeout

…with no obvious errors in the logs. Is there some time limit to building the space that I can change in settings? I set the sleep settings to 10 hours so it’s not that.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 16, 2023, 5:31pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/2 "2023-08-16T17:31:22Z")

</div>

hi @neilmendoza 👋  
Indeed, I’m trying now the duplication with a t4 GPU, and it’s stuck building `nerfacc` python wheel.  
We do have the undocumented parameter for the README.md yaml `startup_duration_timeout: 1h`, However, you can try replacing the build with a pre-compile wheel

Here

> **[Dockerfile · radames/threestudio at 04b0278dc25e0614d5858573429fe324edef8f15](https://huggingface.co/spaces/radames/threestudio/blob/04b0278dc25e0614d5858573429fe324edef8f15/Dockerfile#L55)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

Line 55 on the Dockerfile

`RUN pip install nerfacc==0.5.2 -f https://nerfacc-bucket.s3.us-west-2.amazonaws.com/whl/torch-2.0.0_cu118.html`

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 16, 2023, 5:43pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/3 "2023-08-16T17:43:57Z")

</div>

never mind, since it stills need to build `tinycudann` so better try with `startup_duration_timeout: 1h`

---

<div class="post-metadata">

**Author:** ![neilmendoza](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/neilmendoza/32/18612_2.png) [@neilmendoza](https://discuss.huggingface.co/u/neilmendoza)\
**Post date:** [August 16, 2023, 5:59pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/4 "2023-08-16T17:59:31Z")

</div>

Hi @radames!! 🙋‍♂️

Running it on an A10G as seems like you need [20GB of VRAM](https://github.com/threestudio-project/threestudio) to run some of the bigger models. Think it will actually take longer than an hour to build so stuck **startup\_duration\_timeout: 2h** in README.md as seems like where the settings go (complete noob here).

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 16, 2023, 8:20pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/5 "2023-08-16T20:20:51Z")

</div>

hi @neilmendoza , not it successfully build on a T4 16gb VRAM if you’re using Stable Diffusion, if you need DeepFloyd then you need \>20VRAM

> ```auto
> # if you have agreed the license of DeepFloyd IF and have >20GB VRAM
> # please try this configuration for higher quality
> python launch.py --config configs/dreamfusion-if.yaml --train --gpu 0 system.prompt_processor.prompt="a zoomed out DSLR photo of a baby bunny sitting on top of a stack of pancakes"
> # otherwise you could try with the Stable Diffusion model, which fits in 6GB VRAM
> python launch.py --config configs/dreamfusion-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a zoomed out DSLR photo of a baby bunny sitting on top of a stack of pancakes"
> 
> ```

Need the following patches  
[Dockerfile#L55](https://huggingface.co/spaces/radames/threestudio/blob/main/Dockerfile#L55)  
[Dockerfile#L65](https://huggingface.co/spaces/radames/threestudio/blob/main/Dockerfile#L65)

---

<div class="post-metadata">

**Author:** ![neilmendoza](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/neilmendoza/32/18612_2.png) [@neilmendoza](https://discuss.huggingface.co/u/neilmendoza)\
**Post date:** [August 17, 2023, 11:36am UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/6 "2023-08-17T11:36:54Z")

</div>

Thanks! I set **startup\_duration\_timeout: 4h** in the README.md and also used your patches but still seems to time out when building 🤔

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [August 17, 2023, 9:12pm UTC](https://discuss.huggingface.co/t/build-timeout-when-starting-space/50992/7 "2023-08-17T21:12:04Z")

</div>

hi @neilmendoza ,  
just tried again on a A10, 100s to the first pass, building tiny-nn.  
Please try factory reboot.

here’s the Docker build log

```auto
..
DONE 102.2s

--> ADD https://api.github.com/repos/threestudio-project/threestudio/commits?per_page=1 latest_commit
DONE 0.1s

--> RUN git clone https://github.com/threestudio-project/threestudio.git /home/dreamer/threestudio
Cloning into '/home/dreamer/threestudio'...
DONE 1.0s

--> WORKDIR /home/dreamer/threestudio
DONE 0.0s

--> RUN git checkout 27d69d9845016c8b8aa0bac92ab6d4fea8d1e1b8
Note: switching to '27d69d9845016c8b8aa0bac92ab6d4fea8d1e1b8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 27d69d9 update zero123 simple config
DONE 0.2s

--> Pushing image
DONE 33.6s

--> Exporting cache
DONE 8.8s

```
