Spaces:
Running
Running
File size: 571 Bytes
4a6d5dc db1e6f3 4a6d5dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# 使用官方 Python 运行时作为父镜像
FROM python:3.10
# 解决缓存报错问题
ENV NUMBA_CACHE_DIR /tmp
# 设置工作目录
WORKDIR /app
# 将代码复制到容器中
COPY . /app
# 安装依赖
RUN apt-get update && apt-get install ffmpeg -y
RUN pip install --no-cache-dir gunicorn
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir flask
RUN pip install --no-cache-dir cos-python-sdk-v5
# 暴露端口
EXPOSE 1145
# 运行应用程序
CMD ["gunicorn", "-b", "0.0.0.0:1145", "--timeout", "300", "flask_api_full_song:app"] |