fuliai commited on
Commit
5bf35d8
1 Parent(s): 6863f9f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,15 +1,13 @@
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 \
9
  SSHX_INSTALL=true \
10
  OPENAI_EDGE_TTS_INSTALL=true
11
 
12
- RUN apt-get update && apt-get install -y --no-install-recommends \
 
13
  apt-utils \
14
  build-essential \
15
  libpq-dev \
@@ -19,6 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
19
  vim \
20
  && rm -rf /var/lib/apt/lists/*
21
 
 
 
 
22
  WORKDIR ${HOMEDIR}
23
 
24
  # 使用 CACHEBUST 参数来强制更新
@@ -30,8 +31,7 @@ RUN chmod +x ${HOMEDIR}/edgeTTS-openai-api/src/*.sh \
30
  && ls -la ${HOMEDIR}/edgeTTS-openai-api
31
 
32
  # 运行 setup.sh、sshx.sh 和 remix.sh
33
- RUN --mount=type=secret,id=apikey,mode=0444,required=true \
34
- ${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
 
 
1
  FROM nikolaik/python-nodejs:python3.10-nodejs20
2
 
 
 
 
3
  ENV USER=pn \
4
  HOMEDIR=/home/pn \
5
  PORT=7860 \
6
  SSHX_INSTALL=true \
7
  OPENAI_EDGE_TTS_INSTALL=true
8
 
9
+ RUN --mount=type=secret,id=apikey,mode=0444,required=true \
10
+ apt-get update && apt-get install -y --no-install-recommends \
11
  apt-utils \
12
  build-essential \
13
  libpq-dev \
 
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 参数来强制更新
 
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