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

Dockerfile (Linux): インデントの修正・entrypointにshebangを追加・entrypointの処理順交換 #99

Merged
merged 3 commits into from
Sep 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ COPY --from=download-libtorch-env /opt/libtorch /opt/libtorch

ARG VOICEVOX_CORE_EXAMPLE_VERSION=0.5.2
RUN <<EOF
git clone -b "${VOICEVOX_CORE_EXAMPLE_VERSION}" --depth 1 https://github.com/Hiroshiba/voicevox_core.git /opt/voicevox_core_example
cd /opt/voicevox_core_example
cp ./core.h ./example/python/
cd example/python
LIBRARY_PATH="/opt/voicevox_core:$LIBRARY_PATH" gosu user /opt/python/bin/pip3 install .
git clone -b "${VOICEVOX_CORE_EXAMPLE_VERSION}" --depth 1 https://github.com/Hiroshiba/voicevox_core.git /opt/voicevox_core_example
cd /opt/voicevox_core_example
cp ./core.h ./example/python/
cd example/python
LIBRARY_PATH="/opt/voicevox_core:$LIBRARY_PATH" gosu user /opt/python/bin/pip3 install .
EOF

ADD ./voicevox_engine /opt/voicevox_engine/voicevox_engine
Expand All @@ -189,15 +189,16 @@ EOF

# Update ldconfig on container start
RUN <<EOF
cat <<EOT > /entrypoint.sh
rm -f /etc/ld.so.cache
ldconfig
cat <<EOT > /entrypoint.sh
#!/bin/bash
cat /opt/voicevox_core/README.txt > /dev/stderr

cat /opt/voicevox_core/README.txt > /dev/stderr
rm -f /etc/ld.so.cache
ldconfig

exec "\$@"
EOT
chmod +x /entrypoint.sh
exec "\$@"
EOT
chmod +x /entrypoint.sh
EOF

ENTRYPOINT [ "bash", "/entrypoint.sh" ]
Expand Down