Skip to content

Commit 84fc06d

Browse files
authored
build: release docker (#156)
* build: release docker * docs: update readme fix #16
1 parent 4a5f2b3 commit 84fc06d

File tree

5 files changed

+58
-40
lines changed

5 files changed

+58
-40
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
logs/*/*
2+
!logs/*/.gitkeep
3+
4+
node_modules/
5+
pnpm-lock.yaml
6+
**/__pycache__
7+
test/*
8+
Videos/*
9+
settings-production.toml
10+
startRecord-production.sh
11+
src/upload/cookies.json

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:3.10-slim
2+
3+
MAINTAINER timerring
4+
5+
WORKDIR /app
6+
7+
COPY . /app
8+
9+
COPY ./assets/msyh.ttf /usr/share/fonts/msyh.ttf
10+
11+
RUN pip install -r requirements.txt
12+
13+
RUN apt-get update && apt-get install vim -y \
14+
&& apt-get install -y ffmpeg \
15+
&& apt-get install -y procps \
16+
&& apt-get install lsof -y
17+
18+
ENV BILIVE_PATH=/app
19+
ENV TZ="Asia/Shanghai"
20+
21+
EXPOSE 2233
22+
23+
CMD ["nohup", "python", "-m", "src.upload.upload", ">", "/app/logs/uploadLog/upload-$(date +%Y%m%d-%H%M%S).log", "2>&1", "&"]

README.md

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

208225
## 特别感谢
209226

assets/msyh.ttf

14.3 MB
Binary file not shown.

requirements.txt

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,14 @@
1-
appdirs==1.4.4
2-
audioread==2.1.9
3-
certifi==2021.10.8
4-
cffi==1.15.0
5-
chardet==4.0.0
6-
click==8.1.3
7-
decorator==5.1.1
8-
filelock==3.6.0
9-
filesplit==3.0.2
10-
idna==3.3
11-
joblib==1.1.0
1+
blrec
2+
ffmpeg_python==0.2.0
3+
fontTools==4.55.3
124
librosa==0.9.1
13-
llvmlite==0.38.0
5+
more_itertools==10.6.0
146
numba==0.55.1
157
numpy==1.21.6
16-
packaging==21.3
17-
pooch==1.6.0
18-
pycparser==2.21
19-
pyparsing==3.0.8
208
pysrt==1.1.2
21-
PyYAML==6.0
22-
regex==2022.4.24
23-
requests==2.27.1
24-
resampy==0.2.2
25-
sacremoses==0.0.49
26-
scikit-learn==1.0.2
27-
scipy==1.8.0
28-
sentencepiece==0.1.96
299
six==1.16.0
30-
SoundFile==0.10.3.post1
31-
threadpoolctl==3.1.0
32-
tokenizers==0.12.1
10+
tiktoken==0.4.0
3311
torch==1.11.0
34-
tqdm==4.64.0
35-
typing_extensions==4.2.0
36-
urllib3==1.26.9
37-
more-itertools
38-
transformers>=4.19.0
39-
ffmpeg-python==0.2.0
12+
triton==3.1.0
4013
zhconv==1.4.3
41-
tiktoken==0.4.0
42-
charset-normalizer==2.0.12
43-
greenlet==1.1.2
44-
pyasn1==0.4.8
45-
rsa==4.8
46-
toml==0.10.2
47-
blrec
14+
zhipuai

0 commit comments

Comments
 (0)