moevis commited on
Commit
39b1e03
·
verified ·
1 Parent(s): 533e479

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,22 +1,19 @@
1
  FROM stepfun2025/vllm:step-audio-2-v20250909
2
 
 
 
3
  WORKDIR /app
4
 
5
- COPY --chown=user ./requirements.txt requirements.txt
 
6
 
 
7
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
8
 
9
- COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
11
-
12
- # 复制应用文件
13
- COPY app.py .
14
- COPY start_gradio.sh .
15
-
16
- # 创建模型目录
17
- RUN mkdir -p /app/models
18
 
19
- # 设置脚本可执行权限
20
  RUN chmod +x start_gradio.sh
21
 
22
  # 暴露 Gradio 端口
 
1
  FROM stepfun2025/vllm:step-audio-2-v20250909
2
 
3
+ RUN useradd -m -u 1000 user
4
+
5
  WORKDIR /app
6
 
7
+ # 1. 首先复制依赖文件
8
+ COPY --chown=user requirements.txt .
9
 
10
+ # 2. 安装依赖(只执行一次)
11
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
 
13
+ # 3. 然后复制所有应用文件
14
+ COPY --chown=user start_gradio.sh app.py .
 
 
 
 
 
 
 
15
 
16
+ # 4. 如果需要,设置脚本权限
17
  RUN chmod +x start_gradio.sh
18
 
19
  # 暴露 Gradio 端口