Skip to content

Commit

Permalink
build: release docker (#156)
Browse files Browse the repository at this point in the history
* build: release docker
* docs: update readme
fix #16
  • Loading branch information
timerring authored Jan 18, 2025
1 parent 4a5f2b3 commit 84fc06d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 40 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -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 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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", "&"]
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 特别感谢

Expand Down
Binary file added assets/msyh.ttf
Binary file not shown.
47 changes: 7 additions & 40 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
tiktoken==0.4.0
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
triton==3.1.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
zhipuai

0 comments on commit 84fc06d

Please sign in to comment.