jacky3102 commited on
Commit
ceee45c
·
verified ·
1 Parent(s): 6669afd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # 安装ffmpeg
6
+ RUN apt-get update && apt-get install -y ffmpeg && \
7
+ apt-get clean && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ # 复制依赖文件
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # 复制应用代码
15
+ COPY app.py .
16
+
17
+ # 创建模型缓存目录
18
+ RUN mkdir -p /root/.cache/whisper
19
+
20
+ # 暴露端口
21
+ EXPOSE 7860
22
+
23
+ # 启动应用
24
+ CMD ["python", "app.py"]