# Runtime error on huggingface spaces

**URL:** <https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373>\
**Category:** Beginners\
**Created:** [May 19, 2023, 11:55am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373 "2023-05-19T11:55:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![AeroArtz](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@AeroArtz](https://discuss.huggingface.co/u/AeroArtz)\
**Post date:** [May 19, 2023, 11:55am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/1 "2023-05-19T11:55:26Z")

</div>

So I recently uploaded my project on huggingface spaces which I made using gradio and it gives me the following error: Runtime error

## failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to create new parent process: namespace path: lstat /proc/0/ns/ipc: no such file or directory: unknown

Any idea how I can resolve this? Would be much appreciated, thanks in advance!

---

<div class="post-metadata">

**Author:** ![Ld75](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Ld75](https://discuss.huggingface.co/u/Ld75)\
**Post date:** [May 30, 2023, 4:27pm UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/2 "2023-05-30T16:27:03Z")

</div>

Same problem with a space with a simple docker container running just a FastApi in python (just a hello world)

---

<div class="post-metadata">

**Author:** ![rleeson](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rleeson](https://discuss.huggingface.co/u/rleeson)\
**Post date:** [June 14, 2023, 1:47am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/3 "2023-06-14T01:47:23Z")

</div>

Same problem trying to create my first docker space.

---

<div class="post-metadata">

**Author:** ![rleeson](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rleeson](https://discuss.huggingface.co/u/rleeson)\
**Post date:** [June 14, 2023, 2:46am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/4 "2023-06-14T02:46:50Z")

</div>

Found the fix: Referring to the fastapi\_dummy template: [https://huggingface.co/spaces/DockerTemplates/fastapi\_dummy/tree/main](https://huggingface.co/spaces/DockerTemplates/fastapi_dummy/tree/main) the Dockerfile CMD is CMD [“uvicorn”, “main:app”, “–host”, “0.0.0.0”, “–port”, “7860”], note the “main.app”.

In the “Your first Docker Spaces” documentation: [Your First Docker Space: Text Generation with T5](https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo), the Dockerfile CMD is CMD [“uvicorn”, “app.main:app”, “–host”, “0.0.0.0”, “–port”, “7860”]  
where the reference to the app object is “app.main:app”.

Working locally the fix is to change “app.main:app” to “main:app”. Here’s the gotcha: if you try to rebuild with docker build -t fastapi . , docker will used the cached image so I needed rebuild with the --no-cache flag: `docker build --no-cache -t fastapi .` and then run `docker run -it -p 7860:7860 fastapi` the app works.

---

<div class="post-metadata">

**Author:** ![AeroArtz](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@AeroArtz](https://discuss.huggingface.co/u/AeroArtz)\
**Post date:** [June 14, 2023, 4:41am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/5 "2023-06-14T04:41:06Z")

</div>

Hey thanks a lot for reply I really appreciate it! I fixed it a while back, Its just as you said I tried to justreupload it and it worked

---

<div class="post-metadata">

**Author:** ![CK42](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@CK42](https://discuss.huggingface.co/u/CK42)\
**Post date:** [October 14, 2023, 2:50pm UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/6 "2023-10-14T14:50:15Z")

</div>

Hey, I also had a similar Runtime error and just needed to rebuild as well. Thanks for all the tips.

---

<div class="post-metadata">

**Author:** ![itsanurag](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/itsanurag/32/25319_2.png) [@itsanurag](https://discuss.huggingface.co/u/itsanurag)\
**Post date:** [March 30, 2024, 8:07am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/7 "2024-03-30T08:07:11Z")

</div>

@AeroArtz Is this a type of bug in HuggingFace? I made a space , it works alright for somedays but suddenly randomly shows this error :

runtime error container logs: ===== application startup at 2023-09-04 11:52:18 =====

But then when i reupload the app.py file again, it works! But this happens frequently

If anyone can help with it…?

---

<div class="post-metadata">

**Author:** ![peinan](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/peinan/32/26976_2.png) [@peinan](https://discuss.huggingface.co/u/peinan)\
**Post date:** [May 15, 2024, 8:33am UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/8 "2024-05-15T08:33:07Z")

</div>

I encountered an error with a slightly different message than @AeroArtz, which is the same issue as @itsanurag: `Runtime error failed to create containerd task: failed to create shim task: context deadline exceeded: unknown`. The space is “[PDF Chat - a Hugging Face Space by peinan](https://huggingface.co/spaces/peinan/pdfchat)”

---

<div class="post-metadata">

**Author:** ![b22ee075](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@b22ee075](https://discuss.huggingface.co/u/b22ee075)\
**Post date:** [June 16, 2024, 4:13pm UTC](https://discuss.huggingface.co/t/runtime-error-on-huggingface-spaces/40373/9 "2024-06-16T16:13:42Z")

</div>

Hey, I am facing the same issue. I see that your Space “PDF Chat” is running as of now? Can you please tell how you resolved this issue?
