Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Please ensure that the 'en_US.UTF-8' locale is available on your system. #485

Closed
BowenBao opened this issue Nov 22, 2024 · 4 comments
Labels
question Further information is requested Under Investigation

Comments

@BowenBao
Copy link

BowenBao commented Nov 22, 2024

Describe your question

Hit this error when using omniperf on official rocm/vllm docker.

  ERROR Please ensure that the 'en_US.UTF-8' locale is available on your system.
  ERROR unsupported locale setting

Not sure how to resolve this issue properly. But was able to hack around it by modifying /opt/rocm/libexec/omniperf/utils/utils.py to skip the setlocale call entirely. Everything works afterwards.

--- utils.py
+++ utils.py
@@ -647,6 +647,7 @@


 def set_locale_encoding():
+    return
     try:
         locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
     except locale.Error as error:

I'm not sure if this function call should be strictly required for using omniperf..

Additional context

No response

@BowenBao BowenBao added the question Further information is requested label Nov 22, 2024
@tcgu-amd
Copy link
Contributor

Hi @BowenBao, thanks for reaching out! I think you might be missing the locale in your docker. Can you run the following command insider your rocm/vllm docker container

sudo apt update && sudo install locales && sudo locale-gen en_US.UTF-8

then try the problematic python script again?

Please let me know if this works. Thanks!

@BowenBao
Copy link
Author

Hi @tcgu-amd thanks for advice. Yes running sudo apt update && sudo apt install locales && sudo locale-gen en_US.UTF-8 resolves the issue. Is it possible to relax this constraint though? It would be better UX imo if omniperf just works out of the box.

@tcgu-amd
Copy link
Contributor

Hey @BowenBao, I think this is a rather an unusual case, since the locale would usually be available on the system (it is commonly a part of the system installation process). Relying on a specific locale is pretty common to allow applications to determine the date, time, display, and keyboard to use. Given that configuring the locales is a fairly common practice and most systems should have it configured, I think it is fair the way Omniperf currently works. If the locale happens to not be available, it is probably a good idea to install the correct one anyways :)

@tcgu-amd tcgu-amd closed this as completed Dec 6, 2024
@fxmarty-amd
Copy link

I had the same issue on rocm/dev-ubuntu-22.04:6.3 docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Under Investigation
Projects
None yet
Development

No branches or pull requests

4 participants