-
Notifications
You must be signed in to change notification settings - Fork 217
build!: DockerではPyinstallerビルドのエンジンを用いる #1669
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
base: master
Are you sure you want to change the base?
build!: DockerではPyinstallerビルドのエンジンを用いる #1669
Conversation
7dfc341
to
dac6673
Compare
dac6673
to
f777833
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f777833
(#1669): download-engine-env
を仕上げました。
Dockerfile
Outdated
ARG VOICEVOX_ENGINE_VERSION=latest | ||
ARG USE_GPU=false | ||
|
||
RUN --mount=type=secret,id=gh-token,env=GH_TOKEN <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 シェルスクリプトの書き方については、
- インデントは4
- (実質的に)定数となる変数は大文字
というところだけ合わせておく。
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まだ完成じゃないかもですが気になるポイントをコメントしてみました!
かなり良い感じな気がしました!!!
判断メモ:
Github Runner側でパッケージをダウンロードして、dockerfileには COPY するだけという手もありそう。
でも今までは結構dockerfileの中でダウンロードしたりしていたので、そっちに合わせる手もありそう。
どちらが良いか今のところわからないので、個人的には一旦どっちでも良さそう!!
現状draftですが、もしよかったら @aoirint さんからも気になる点があったらコメントいただけると・・・!! 🙏 |
これにより、
のどちらかをやればdraftを外せる状態になると思います。 ちなみにUbuntu 22.04の |
@aoirint さんのキャッシュに関してのコメントを見て、20.04を爆破するのも良さそうですが、その場合でもlatestは辞めたほうが良さそうだなと思いました!! |
|
cce8419
to
10a6205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6a042f9
(#1669): README.mdとCONTRIBUTING.mdを更新
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -15,8 +14,6 @@ on: | |||
env: | |||
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine | |||
VOICEVOX_RESOURCE_VERSION: "0.23.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ただのメモコメントです)
あ、VOICEVOX_RESOURCE_VERSIONは本当はなくせそうな気がしますね!!
packageのなかにあるはずなので・・・・・・と思ったら入ってなさそう!!!
じゃあ今の形が良さそう!!
Refs: VOICEVOX#1669 (comment) Co-authored-by: Hiroshiba <[email protected]>
Refs: VOICEVOX#1669 (comment) Suggested-by: Hiroshiba <[email protected]>
|
push: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この変更で、latestがpushされなくなることに気づきました!
今までどおりmainブランチのものをlatestにpushするのは、まあ結構な変更をしないといけない気がします。
(例えばこのymlにlatestとしてpushする
フラグを作り、mainブランチをビルドする-dev
releases時にそのフラグをtrueにする)
さらに調べてると、そもそもdockerのlatest
タグは安定版を提供すべきっぽいことに気づきました!!
個人的には、言われてみればlatest
で開発最新版が降ってくるのは一般的じゃない気がするので一般的なのに合わせたいのと、あとまあビルドは1本化したいのと、このPRで一気に仕様変更でも別に良いかな~~~とおもうので、今のPRの内容に賛成です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latestがpushされなくなる
ことについて気付いたことがあったのでこっちにもぶら下げておきます。
#1669 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1674 (comment) にて latest の仕様変更について返信しました。PR の内容に賛成です。
: # workflow_call/workflow_dispatchでのバージョン名か、latest | ||
version_or_latest=${{ inputs.version || 'latest' }} | ||
|
||
case "$version_or_latest" in | ||
latest) version=$(gh release view -R "$GITHUB_REPOSITORY" --json tagName -q .tagName) ;; | ||
*) version=$version_or_latest | ||
esac | ||
|
||
echo "version_or_latest=$version_or_latest" >> "$GITHUB_OUTPUT" | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここ、現状のコードだとversion_or_latest
がlatestになることはありえなそうでした!
latest
になるのはinputs.version
が空、つまりon: push
のときだけだけど、on: push
が消えてるので。
このコードを残すべきかどうかが難しいんですよね。。。。。。。。
このPR時点ではデッドコードになるけど、latestタグを復活させる場合は有用かもだし。。。。。。
latestを復活させるときに有用かもだから、latestの扱いを考えるissue内に<details>
とかでサンプルとしてコードスニペットを置いといて、このPRからは消してしまうとか・・・・・?
ちょっと考えきれてないのですが、一旦コメントまで 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このコード、消した方が良いかもです・・・!
現状使われてないはず(そもそもこの認識があってるのかどうか。。)。
あと、将来的にも使われないかもだと思いました!
version_or_latest
ではなく、is_latest
やis_edge
プラグを用意して、それらのフラグがついてたらlatest
やedge
も付けてpushする、という流れにもなりえそうだな~~~と。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こういう箇所 (if:
)もYAGNIっちゃう感じでしょうか?最低限TODOコメントくらいは置いておかないと、is_edge
とかを追加するときに忘れそうな気がしています。
run-release-test-workflow:
# version が指定されている場合のみ実行する
if: needs.config.outputs.version_or_latest != 'latest'
needs: [config, build-docker, build-docker-multi-platform]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちょっとよくわかってないんですけど、例示されているとこのifはYAGNIではなく、現状で必須な気がします!
build-engine.yml
はon: push
があるので。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ、私が指したのはbuild-engine-container
にあるrun-release-test-workflow
ですね。よく考えたらbuild-engine
(旧build-engine-package
)にも同名のものがあったのを失念していました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あっほんとだ、失礼しました 🙇
新しいlatestもedgeもビルドしたimageのテストが必要なので、このifは要らない・・・はず・・・?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新しいlatestもedgeもビルドしたimageのテストが必要なので、
今のmasterブランチだとそうなっていない(latest
に対してスキップされる)ので、是正するなら今のmasterブランチに向けて別PRということになるかなと。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今のmasterブランチ:latestがビルドされるが、latestに対してのテストはしない
このPRでifをなくしたら:latestがビルドされず、latestに対してのテストはしない
なので、if有無の差分は影響がないのかなと思ってます!
それはさておき、latestのビルドやめるのは破壊的変更だから別PRのが良いのではという感じであれば、賛成です・・・!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このPRでifをなくしたら:latestがビルドされず、
これについては一つ考慮しなくてはならないことがあると思っていて、build-engine-container
のon.workflow_dispatch
は消していないので、"latest"
もしくは""
を入力可能だと思います。もっともbuild-latest-dev
からbuild-engine-container
を呼ぶ箇所は消滅するので、このon.workflow_dispatch
は消してもそんなに問題無いかも?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
それはさておき、latestのビルドやめるのは破壊的変更だから別PRのが良いのではという感じであれば、賛成です・・・!
是正というのは「新しいlatestもedgeもビルドしたimageのテストが必要なので、」に対して、今はlatestに対してビルドを回していないので回すとしたら、という意図でした。
ちょっとこの話はややこしくなりすぎた感じがします。提案なのですが#1669 (comment)のsuggestionを実行し、「とりあえず今はlatest
とはmasterブランチの最新版を指す」ということにしませんか…? #1674 のことはこのPRをマージした後で考える感じで。
Refs: VOICEVOX#1669 (comment) Suggested-by: Hiroshiba <[email protected]>
Refs: VOICEVOX#1669 (comment) Co-authored-by: Hiroshiba <[email protected]>
Refs: VOICEVOX#1669 (comment) Co-authored-by: Hiroshiba <[email protected]>
Refs: VOICEVOX#1669 (comment) Co-authored-by: Hiroshiba <[email protected]>
内容
関連 Issue
Resolves #1668
スクリーンショット・動画など
その他