| 123456789101112131415161718 |
- # 使用 Python 3.8.0 作为基础镜像
- FROM python:3.8.0
- # 设置工作目录
- WORKDIR /app
- # 复制当前目录下的所有文件到工作目录
- COPY . /app
- RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
- # 安装依赖
- RUN pip install --no-cache-dir -r requirements.txt
- # 暴露端口
- EXPOSE 2003
- # 运行应用程序
- CMD ["python", "speech_server.py"]
|