# Runtime error on huggingface spaces

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%3E%5C
**Category:** Beginners\
**Created:** [May 19, 2023, 11:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAeroArtz)%5C
**Post date:** [May 19, 2023, 11:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLd75)%5C
**Post date:** [May 30, 2023, 4:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frleeson)%5C
**Post date:** [June 14, 2023, 1:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F3 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frleeson)%5C
**Post date:** [June 14, 2023, 2:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F4 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAeroArtz)%5C
**Post date:** [June 14, 2023, 4:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F5 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FCK42)%5C
**Post date:** [October 14, 2023, 2:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F6 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fitsanurag)%5C
**Post date:** [March 30, 2024, 8:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F7 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpeinan)%5C
**Post date:** [May 15, 2024, 8:33am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F8 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fb22ee075)%5C
**Post date:** [June 16, 2024, 4:13pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-on-huggingface-spaces%2F40373%2F9 "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?
