Skip to content

Commit e422b05

Browse files
authored
build: release gpu version 0.3.0 (#285)
fix #185
1 parent 0f9df8f commit e422b05

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

Dockerfile-GPU

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ ENV TZ="Asia/Shanghai"
1919

2020
EXPOSE 2233
2121

22-
CMD ["python", "-m", "src.upload.upload"]
22+
CMD ["./start.sh"]

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pip install -r requirements.txt
173173
> [!TIP]
174174
> - 有关自动切片的配置在 `bilive.toml` 文件的 `[slice]` 部分。
175175
> - `auto_slice` 默认为 false, 即不进行自动切片。
176-
> - 可以通过单元测试调试你自己的 prompt,单元测试在 `tests/test_autoslice.py`,执行 `python -m unittest` 即可,后接 `tests.test_autoslice` 测试整个模块,`tests.test_autoslice.TestXXXMain` 测试某个模型。部分模型会返回多个标题,请在 prompt 中指出,仅返回一个标题的字符串即可。
176+
> - 可以通过单元测试调试你自己的 prompt,单元测试在 `tests/test_autoslice.py`,执行 `python -m unittest` 即可,后接 `tests.test_autoslice` 测试整个模块,`tests.test_autoslice.TestXXXMain` 测试某个模型。部分模型会返回多个标题及 emoji,请在 prompt 中指出,仅返回一个标题的字符串即可,推荐先自行调试确保您的 prompt works,欢迎在 issue 中分享你的 prompt
177177
178178
MLLM 模型主要用于自动切片后的切片标题生成,此功能默认关闭,如果需要打开请将 `auto_slice` 参数设置为 `true`,并且写下你自己的 `slice_prompt`(可以包含 `{artist}` 关键词会自动替换),其他配置分别有:
179179
- `slice_duration` 以秒为单位设置切片时长(不建议超过 180 秒)。
@@ -328,13 +328,17 @@ docker run -itd \
328328

329329
#### 有 GPU 版本
330330

331-
如果你能看到这行字,说明 0.3.0 版本还没有发布,会在两天内测试完发布,请耐心等待。可以尝试源码部署。注意:0.2.x 版本和 0.3.0 版本不兼容,如需采用 0.2.x 版本,请参考项目文档而不是本 README
331+
有 GPU 版本仅支持 amd64 架构,已内置 small 参数量的模型,如需使用其他参数量模型,请自行按照 2.1.2 步骤调整。`your_record_password` 规则同上
332332

333333
```bash
334-
sudo docker run \
335-
-itd \
334+
sudo docker run -itd \
335+
-v your/path/to/bilive.toml:/app/bilive.toml \
336+
-v your/path/to/settings.toml:/app/settings.toml \
337+
-v your/path/to/Videos:/app/Videos \
338+
-v your/path/to/logs:/app/logs \
336339
--gpus 'all,"capabilities=compute,utility,video"' \
337340
--name bilive_docker_gpu \
341+
-e RECORD_KEY=your_record_password \
338342
-p 22333:2233 \
339343
ghcr.io/timerring/bilive-gpu:0.3.0
340344
```
@@ -345,7 +349,7 @@ sudo docker run \
345349

346350
#### 使用镜像
347351

348-
默认 CPU latest version,如需使用 GPU 版本,请自行在 `compose.yml` 中调整。
352+
如需使用 GPU 版本,请自行在 `compose.yml` 中调整。
349353

350354
```bash
351355
docker compose up -d

docs/installation.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,27 @@ sudo docker run \
241241

242242
### Docker Compose
243243

244-
See [Installation](https://bilive.timerring.com/installation.html) for the adjustment method of `compose.yml`.
245-
246244
#### Use image
247245

248-
Default CPU latest version, if you need to use the GPU version, please adjust it in `compose.yml` yourself.
246+
The default is CPU latest version, if you need to use the GPU version, please modify the `image: ghcr.io/timerring/bilive:X.X.X` to `image: ghcr.io/timerring/bilive-gpu:X.X.X` in `compose.yml`.
249247

250248
```bash
251249
docker compose up -d
252250
```
253251

254252
#### Self-build
255253

256-
Please adjust the relevant configuration in `compose.yml`, then execute the following command:
254+
> [!IMPORTANT]
255+
> If you want to compose self-built images, **please change the login method** in `src/upload/upload.py` from `LoginController().login_bilibili_with_cookie_file(file)` to `LoginController().login_bilibili(export=False)`, otherwise the login process will fail.
256+
257+
The relevant configuration has been written, please replace the 3 to 6 lines of `compose.yml` with:
258+
259+
```yaml
260+
build:
261+
context: .
262+
dockerfile: Dockerfile # Dockerfile-GPU
263+
# image: ghcr.io/timerring/bilive:X.X.X # ghcr.io/timerring/bilive-gpu:X.X.X
264+
```
257265

258266
```bash
259267
docker build

0 commit comments

Comments
 (0)