Skip to content

Commit

Permalink
revert Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Oct 9, 2021
1 parent 430679c commit 556c590
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EOF

RUN <<EOF
# Workaround: remove unused libcore (cpu, gpu)
# Prevent error: $(/sbin/ldconfig.real: /opt/voicevox_core/libcore.so is not a symbolic link)
# Prevent error: `/sbin/ldconfig.real: /opt/voicevox_core/libcore.so is not a symbolic link`
set -eux
if [ "${VOICEVOX_CORE_LIBRARY_NAME}" = "core" ]; then
rm -f /opt/voicevox_core/libcore_cpu.so
Expand All @@ -48,6 +48,7 @@ RUN <<EOF
ldconfig
EOF


# Download LibTorch
FROM ${BASE_IMAGE} AS download-libtorch-env
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -77,7 +78,7 @@ RUN <<EOF

LIBTORCH_PATH="/opt/libtorch/lib"

# prevent nuitka build error caused by corrupted $(ldconfig -p) outputs
# prevent nuitka build error caused by corrupted `ldconfig -p` outputs
if [ "${USE_GLIBC_231_WORKAROUND}" = "1" ]; then
LIBTORCH_PATH=""
fi
Expand Down Expand Up @@ -108,6 +109,7 @@ RUN <<EOF
fi
EOF


# Compile Python (version locked)
FROM ${BASE_IMAGE} AS compile-python-env

Expand Down Expand Up @@ -164,6 +166,7 @@ EOF
# ldconfig
# EOF


# Runtime
FROM ${BASE_RUNTIME_IMAGE} AS runtime-env
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -260,7 +263,7 @@ EOF

# Create container start shell
ARG USE_GLIBC_231_WORKAROUND=0
COPY --chmod=775 /entrypoint.sh <<EOF
COPY --chmod=775 <<EOF /entrypoint.sh
#!/bin/bash
cat /opt/voicevox_core/README.txt > /dev/stderr

Expand All @@ -274,7 +277,7 @@ fi
exec "\$@"
EOF

ENTRYPOINT [ "/entrypoint.sh" ]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "gosu", "user", "/opt/python/bin/python3", "./run.py", "--voicevox_dir", "/opt/voicevox_core/", "--voicelib_dir", "/opt/voicevox_core/", "--host", "0.0.0.0" ]

# Enable use_gpu
Expand Down

0 comments on commit 556c590

Please sign in to comment.