-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a8f6c1
commit 94acecc
Showing
14 changed files
with
242 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
# 设置基础镜像,这里选择 Python 3.8 | ||
FROM python:3.8.19 | ||
# 使用 Ubuntu 22.04 作为基础镜像 | ||
FROM ubuntu:22.04 | ||
|
||
# 设置工作目录 | ||
WORKDIR /app | ||
|
||
# 复制项目文件到容器中的工作目录 | ||
COPY . /app | ||
|
||
# 安装 Python 依赖 | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
# 安装系统依赖项 | ||
RUN apt-get update && \ | ||
apt-get install -y libgl1-mesa-glx libpython3-dev | ||
|
||
# 安装 Node.js 和 npm | ||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# 安装 Python 3.9 | ||
RUN apt-get install -y python3.9 | ||
|
||
# 安装 npm 依赖和 Playwright 浏览器 | ||
RUN npm install && npx playwright install | ||
# 安装 pip | ||
RUN apt-get install -y python3-pip | ||
|
||
# 安装 Python 依赖项 | ||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
|
||
# 安装 Playwright 及其依赖项 | ||
RUN playwright install --with-deps chromium | ||
|
||
# 暴露端口 | ||
EXPOSE 8501 | ||
|
||
# 设置环境变量以指定操作系统 | ||
ENV OS_TYPE="linux" | ||
|
||
# 运行 Streamlit 应用 | ||
CMD ["streamlit", "run", "web_ui.py", "--server.port", "8501"] | ||
CMD ["python3", "-m", "streamlit", "run", "web_ui.py", "--server.port", "8501"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.