Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -12
Dockerfile
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
FROM nikolaik/python-nodejs:python3.10-nodejs20
|
2 |
|
|
|
|
|
|
|
3 |
ENV USER=pn \
|
4 |
HOMEDIR=/home/pn \
|
5 |
PORT=7860 \
|
@@ -17,25 +20,18 @@ RUN --mount=type=secret,id=apikey,mode=0444,required=true \
|
|
17 |
vim \
|
18 |
&& rm -rf /var/lib/apt/lists/*
|
19 |
|
20 |
-
# 添加 CACHEBUST 参数
|
21 |
-
ARG CACHEBUST=$(cat /run/secrets/apikey)
|
22 |
-
|
23 |
WORKDIR ${HOMEDIR}
|
24 |
|
25 |
# 使用 CACHEBUST 参数来强制更新
|
26 |
-
RUN git clone https://github.com/aigem/edgeTTS-openai-api.git
|
27 |
-
|
28 |
-
# 给所有 .sh 文件添加执行权限
|
29 |
-
RUN chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
|
30 |
&& ls -la ${HOMEDIR}/edgeTTS-openai-api/src \
|
31 |
-
&& ls -la ${HOMEDIR}/edgeTTS-openai-api
|
32 |
-
|
33 |
-
# 运行 setup.sh、sshx.sh 和 remix.sh
|
34 |
-
RUN ${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
|
35 |
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
|
36 |
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi
|
37 |
|
38 |
# 暴露 Remix 端口
|
39 |
EXPOSE ${PORT}
|
40 |
|
41 |
-
ENTRYPOINT ["/home/pn/edgeTTS-openai-api/src/startup.sh"]
|
|
|
1 |
FROM nikolaik/python-nodejs:python3.10-nodejs20
|
2 |
|
3 |
+
# 添加 CACHEBUST 参数
|
4 |
+
ARG CACHEBUST=1
|
5 |
+
|
6 |
ENV USER=pn \
|
7 |
HOMEDIR=/home/pn \
|
8 |
PORT=7860 \
|
|
|
20 |
vim \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
|
|
|
|
|
|
23 |
WORKDIR ${HOMEDIR}
|
24 |
|
25 |
# 使用 CACHEBUST 参数来强制更新
|
26 |
+
RUN git clone https://github.com/aigem/edgeTTS-openai-api.git \
|
27 |
+
&& chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
|
|
|
|
|
28 |
&& ls -la ${HOMEDIR}/edgeTTS-openai-api/src \
|
29 |
+
&& ls -la ${HOMEDIR}/edgeTTS-openai-api \
|
30 |
+
&& ${HOMEDIR}/edgeTTS-openai-api/src/setup.sh \
|
|
|
|
|
31 |
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/sshx.sh; fi \
|
32 |
&& if [ "$OPENAI_EDGE_TTS_INSTALL" = true ]; then ${HOMEDIR}/edgeTTS-openai-api/src/openai-edge-tts.sh; fi
|
33 |
|
34 |
# 暴露 Remix 端口
|
35 |
EXPOSE ${PORT}
|
36 |
|
37 |
+
ENTRYPOINT ["/home/pn/edgeTTS-openai-api/src/startup.sh"]
|