Dockerfile 390 B

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