Spaces:
Sleeping
Sleeping
| # 使用官方的Python运行时作为父镜像 | |
| FROM python:3.10-slim-bullseye | |
| # 在容器中设置工作目录 | |
| WORKDIR /MoneyPrinterTurbo | |
| # 设置/MoneyPrinterTurbo目录权限为777 | |
| RUN chmod 777 /MoneyPrinterTurbo | |
| ENV PYTHONPATH="/MoneyPrinterTurbo" | |
| # 安装git和其他系统依赖 | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| imagemagick \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 修复ImageMagick的安全策略 | |
| RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml | |
| # 克隆GitHub仓库 | |
| RUN git clone https://github.com/harry0703/MoneyPrinterTurbo . | |
| # 安装Python依赖 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 暴露应用运行的端口 | |
| EXPOSE 8501 | |
| # 运行应用程序的命令 | |
| CMD ["streamlit", "run", "./webui/Main.py","--server.address=0.0.0.0","--server.enableCORS=True","--browser.gatherUsageStats=False"] |