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

Workaround: Dockerイメージ, entrypointでldconfigを実行 #228

Merged

Conversation

aoirint
Copy link
Member

@aoirint aoirint commented Dec 9, 2021

内容

GPU版Dockerイメージのビルド時に、libtorch_cuda_cpp.soが認識されない(ld.so.cacheに追加されていない)現象が起きることがあります。

ImportError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory

Workaround/QuickFixとして、コンテナ実行時の初期化処理(entrypoint)で毎回ldconfigを実行するようにします。

ベースイメージがUbuntu 18.04の場合は、ldconfigを実行すると、glibcのバージョンが古く、LibTorchの共有ライブラリを正しく認識することができないため、従来どおりビルド時変数USE_GLIBC_231_WORKAROUNDに基づいて、LD_LIBRARY_PATH環境変数を使用しますが、ユーザが環境変数を上書きしにくくなるため、本来はldconfigを実行するほうが望ましいと考えています。

また、Ubuntu 18.04のイメージは、互換性を確保した実行バイナリビルドに使用していることもあり、glibcのバージョンを、OSと対応していないバージョンに上げることは、望ましくないと考えています。

関連 Issue

ref #226

その他

正確な原因・直し方が分かる方いませんか...

@aoirint aoirint changed the title Workaround: 毎コンテナ実行時にldconfigを実行 Workaround: Dockerイメージ, 毎コンテナ実行時にldconfigを実行 Dec 9, 2021
@aoirint aoirint changed the title Workaround: Dockerイメージ, 毎コンテナ実行時にldconfigを実行 Workaround: Dockerイメージ, コンテナ実行時にldconfigを実行 Dec 9, 2021
@aoirint aoirint changed the title Workaround: Dockerイメージ, コンテナ実行時にldconfigを実行 Workaround: Dockerイメージ, entrypointでldconfigを実行 Dec 9, 2021
@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Coverage Result

Resultを開く
Name Stmts Miss Cover
voicevox_engine/init.py 0 0 coverage-100%
voicevox_engine/acoustic_feature_extractor.py 85 0 coverage-100%
voicevox_engine/full_context_label.py 160 7 coverage-96%
voicevox_engine/kana_parser.py 75 1 coverage-99%
voicevox_engine/model.py 70 7 coverage-90%
voicevox_engine/mora_list.py 4 0 coverage-100%
voicevox_engine/preset/Preset.py 12 0 coverage-100%
voicevox_engine/preset/PresetLoader.py 34 1 coverage-97%
voicevox_engine/preset/init.py 3 0 coverage-100%
voicevox_engine/synthesis_engine/init.py 4 0 coverage-100%
voicevox_engine/synthesis_engine/forwarder.py 76 66 coverage-13%
voicevox_engine/synthesis_engine/make_synthesis_engine.py 23 18 coverage-22%
voicevox_engine/synthesis_engine/synthesis_engine.py 124 7 coverage-94%
voicevox_engine/utility/init.py 2 0 coverage-100%
voicevox_engine/utility/connect_base64_waves.py 35 3 coverage-91%
TOTAL 707 110 coverage-84%

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1560725832

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.441%

Totals Coverage Status
Change from base Build 1560431902: 0.0%
Covered Lines: 597
Relevant Lines: 707

💛 - Coveralls

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!
(正直よくわかっていませんが。。)

Copy link
Member

@takana-v takana-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
正確な原因は分かりませんが...

@takana-v takana-v merged commit 5fe249e into VOICEVOX:master Dec 10, 2021
@aoirint aoirint deleted the patch-ldconfig-every-container-run branch October 9, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants