File size: 1,073 Bytes
68e0ab4
 
b141738
54a8188
b141738
68e0ab4
 
 
 
 
 
5420100
68e0ab4
 
 
 
 
 
 
 
 
 
 
6863f9f
b141738
 
21af2f5
b141738
 
21af2f5
8d73494
68e0ab4
 
 
 
245f634
5420100
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
FROM nikolaik/python-nodejs:python3.10-nodejs20

# 添加 CACHEBUST 参数
ARG CACHEBUST=1

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}

# 使用 CACHEBUST 参数来强制更新
RUN git clone https://github.com/aigem/edgeTTS-openai-api.git \
    && chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
    && ls -la ${HOMEDIR}/edgeTTS-openai-api/src \
    && ls -la ${HOMEDIR}/edgeTTS-openai-api \
    && ${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}

# 在启动时设置 API_KEY 环境变量
ENTRYPOINT /home/pn/edgeTTS-openai-api/src/startup.sh