-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
44 lines (31 loc) · 1.17 KB
/
dockerfile
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
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 \
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"]