Skip to content

Commit

Permalink
增加dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lissettecarlr committed Nov 25, 2024
1 parent 7ddabf0 commit 60b45ff
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 使用 Python 3.9 作为基础镜像
FROM python:3.9-slim

# 设置工作目录
WORKDIR /app

# 安装 git
RUN apt-get update && apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# 克隆仓库
RUN git clone https://github.com/lissettecarlr/ncmdump .

# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt

# 暴露端口
EXPOSE 23231

# 启动 Streamlit 服务
CMD ["streamlit", "run", "web.py", "--server.port", "23231", "--server.maxUploadSize=500", "--server.address", "0.0.0.0"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ WEB环境:
pip install streamlit
```

Docker环境:
```bash
docker build -t ncmdump .
docker run -d -p 23231:23231 ncmdump .
```

如果你比较懒,可以直接全安装:
```bash
pip install -r requirements.txt
Expand Down

0 comments on commit 60b45ff

Please sign in to comment.