Spaces:
Running
Running
File size: 1,317 Bytes
8598b7e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
FROM python:3.12-slim-bookworm AS stage-1
ARG TARGETARCH
ARG HUGGINGFACE_MODEL=fish-speech-1.4
ARG HF_ENDPOINT=https://huggingface.co
WORKDIR /opt/fish-speech
RUN set -ex \
&& pip install huggingface_hub \
&& HF_ENDPOINT=${HF_ENDPOINT} huggingface-cli download --resume-download fishaudio/${HUGGINGFACE_MODEL} --local-dir checkpoints/${HUGGINGFACE_MODEL}
FROM python:3.12-slim-bookworm
ARG TARGETARCH
ARG DEPENDENCIES=" \
ca-certificates \
libsox-dev \
build-essential \
cmake \
libasound-dev \
portaudio19-dev \
libportaudio2 \
libportaudiocpp0 \
ffmpeg"
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -ex \
&& rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache \
&& apt-get update \
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash
WORKDIR /opt/fish-speech
COPY . .
RUN --mount=type=cache,target=/root/.cache,sharing=locked \
set -ex \
&& pip install -e .[stable]
COPY --from=stage-1 /opt/fish-speech/checkpoints /opt/fish-speech/checkpoints
ENV GRADIO_SERVER_NAME="0.0.0.0"
EXPOSE 7860
CMD ["./entrypoint.sh"]
|