Spaces:
Running
Running
File size: 1,156 Bytes
68e0ab4 a779de6 8d73494 a779de6 68e0ab4 21af2f5 68e0ab4 21af2f5 68e0ab4 c8173ca 21af2f5 8d73494 68e0ab4 a779de6 |
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 |
FROM nikolaik/python-nodejs:python3.10-nodejs20
# 禁用 Docker 缓存
ARG CACHEBUST=2
ENV USER=pn \
HOMEDIR=/home/pn \
PORT=7860 \
SSHX_INSTALL=true \
OPENAI_EDGE_TTS_INSTALL=true
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
libpq-dev \
neofetch \
git \
curl \
vim \
&& rm -rf /var/lib/apt/lists/*
WORKDIR ${HOMEDIR}
# git clone 到指定目录下
RUN git clone https://github.com/aigem/edgeTTS-openai-api.git
# 给所有 .sh 文件添加执行权限
RUN chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
&& ls -la ${HOMEDIR}/edgeTTS-openai-api/src \
&& ls -la ${HOMEDIR}/edgeTTS-openai-api
# 运行 setup.sh、sshx.sh 和 remix.sh
RUN --mount=type=secret,id=apikey,mode=0444,required=true \
${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi
# 暴露 Remix 端口
EXPOSE ${PORT}
ENTRYPOINT ["/home/pn/edgeTTS-openai-api/src/startup.sh"]
|