# \[Runtime Error\] Using Undistro (Wolfi OS) in HF Docker Spaces

**URL:** <https://discuss.huggingface.co/t/runtime-error-using-undistro-wolfi-os-in-hf-docker-spaces/166329>\
**Category:** Spaces\
**Created:** [August 10, 2025, 3:46pm UTC](https://discuss.huggingface.co/t/runtime-error-using-undistro-wolfi-os-in-hf-docker-spaces/166329 "2025-08-10T15:46:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MH0386](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mh0386/32/52392_2.png) [@MH0386](https://discuss.huggingface.co/u/MH0386)\
**Post date:** [August 10, 2025, 3:46pm UTC](https://discuss.huggingface.co/t/runtime-error-using-undistro-wolfi-os-in-hf-docker-spaces/166329/1 "2025-08-10T15:46:33Z")

</div>

I wonder how Hugging Face is running Docker Spaces. [My space](https://huggingface.co/spaces/AlphaSphereDotAI/Chattr/tree/a56ea508a7184a40b37b231762d44a2b432e896a) is working fine, but Hugging Face gives me a runtime error

```bash
===== Application Startup at 2025-08-10 15:41:44 =====

Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f984b138780 (most recent call first):
  <no Python frame>
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f52d1425780 (most recent call first):
  <no Python frame>

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [August 10, 2025, 11:41pm UTC](https://discuss.huggingface.co/t/runtime-error-using-undistro-wolfi-os-in-hf-docker-spaces/166329/2 "2025-08-10T23:41:52Z")

</div>

`Dockerfile` for Hugging Face’s Docker Space [requires some tricks in terms of permissions, paths and other settings](https://huggingface.co/docs/hub/spaces-sdks-docker).  
In any case, it [may be safer not to hardcode `PYTHONHOME`](https://stackoverflow.com/questions/38132755/importerror-no-module-named-encodings).
