chatyou commited on
Commit
a65f2db
·
verified ·
1 Parent(s): 82e9f2f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方的Python运行时作为父镜像
2
+ FROM python:3.10-slim-bullseye
3
+
4
+ # 在容器中设置工作目录
5
+ WORKDIR /MoneyPrinterTurbo
6
+
7
+ # 设置/MoneyPrinterTurbo目录权限为777
8
+ RUN chmod 777 /MoneyPrinterTurbo
9
+
10
+ ENV PYTHONPATH="/MoneyPrinterTurbo"
11
+
12
+ # 安装git和其他系统依赖
13
+ RUN apt-get update && apt-get install -y \
14
+ git \
15
+ imagemagick \
16
+ ffmpeg \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # 修复ImageMagick的安全策略
20
+ RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
21
+
22
+ # 克隆GitHub仓库
23
+ RUN git clone https://github.com/harry0703/MoneyPrinterTurbo .
24
+
25
+ # 安装Python依赖
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # 暴露应用运行的端口
29
+ EXPOSE 7860
30
+
31
+ # 运行应用程序的命令
32
+ CMD ["streamlit", "run", "./webui/Main.py","--server.address=0.0.0.0","--server.enableCORS=True","--browser.serverPort=7860","--browser.gatherUsageStats=False"]