build: release docker (#156)

* build: release docker
* docs: update readme
fix #16
This commit is contained in:
John Howe
2025-01-18 18:06:52 +08:00
committed by GitHub
parent 4a5f2b3637
commit 84fc06d35c
5 changed files with 59 additions and 41 deletions

11
.dockerignore Normal file
View File

@@ -0,0 +1,11 @@
logs/*/*
!logs/*/.gitkeep
node_modules/
pnpm-lock.yaml
**/__pycache__
test/*
Videos/*
settings-production.toml
startRecord-production.sh
src/upload/cookies.json

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3.10-slim
MAINTAINER timerring
WORKDIR /app
COPY . /app
COPY ./assets/msyh.ttf /usr/share/fonts/msyh.ttf
RUN pip install -r requirements.txt
RUN apt-get update && apt-get install vim -y \
&& apt-get install -y ffmpeg \
&& apt-get install -y procps \
&& apt-get install lsof -y
ENV BILIVE_PATH=/app
ENV TZ="Asia/Shanghai"
EXPOSE 2233
CMD ["nohup", "python", "-m", "src.upload.upload", ">", "/app/logs/uploadLog/upload-$(date +%Y%m%d-%H%M%S).log", "2>&1", "&"]

View File

@@ -204,6 +204,23 @@ logs # 日志文件夹
> + 默认描述是"【弹幕+字幕】[XXX]直播,直播间地址:[https://live.bilibili.com/XXX] 内容仅供娱乐,直播中主播的言论、观点和行为均由主播本人负责,不代表录播员的观点或立场。"
> + 默认标签是根据主播名字自动在 b 站搜索推荐中抓取的[热搜词],详见[bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/search/suggest.md)。
### Docker 运行
也可以直接拉取 docker 镜像运行,默认 latest如果无法pull考虑使用镜像地址例如 https://dockerpull.cn/
> [!IMPORTANT]
> 如果不需要使用可视化页面可以忽略以下提醒:
> 不推荐在有公网 ip 的服务器上直接暴露 22333 端口访问管理页面,如果使用请自行限制端口入站 ip 规则或者采用 nginx 等反向代理配置密钥限制他人访问。
> 默认启动 upload 进程record 以及 scan 可以在配置后手动启动,相关配置流程从 3.2 开始即可,此版本 docker 镜像无 GPU 配置。
```bash
sudo docker run \
-itd \
--name bilive_docker \
-p 22333:2233 \
timerring/bilive
```
## 特别感谢

BIN
assets/msyh.ttf Normal file

Binary file not shown.

View File

@@ -1,47 +1,14 @@
appdirs==1.4.4
audioread==2.1.9
certifi==2021.10.8
cffi==1.15.0
chardet==4.0.0
click==8.1.3
decorator==5.1.1
filelock==3.6.0
filesplit==3.0.2
idna==3.3
joblib==1.1.0
blrec
ffmpeg_python==0.2.0
fontTools==4.55.3
librosa==0.9.1
llvmlite==0.38.0
more_itertools==10.6.0
numba==0.55.1
numpy==1.21.6
packaging==21.3
pooch==1.6.0
pycparser==2.21
pyparsing==3.0.8
pysrt==1.1.2
PyYAML==6.0
regex==2022.4.24
requests==2.27.1
resampy==0.2.2
sacremoses==0.0.49
scikit-learn==1.0.2
scipy==1.8.0
sentencepiece==0.1.96
six==1.16.0
SoundFile==0.10.3.post1
threadpoolctl==3.1.0
tokenizers==0.12.1
torch==1.11.0
tqdm==4.64.0
typing_extensions==4.2.0
urllib3==1.26.9
more-itertools
transformers>=4.19.0
ffmpeg-python==0.2.0
zhconv==1.4.3
tiktoken==0.4.0
charset-normalizer==2.0.12
greenlet==1.1.2
pyasn1==0.4.8
rsa==4.8
toml==0.10.2
blrec
torch==1.11.0
triton==3.1.0
zhconv==1.4.3
zhipuai