Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

低版本docker命令 #113

Open
wants to merge 4 commits into
base: feature
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,25 @@ To make it easier to use and save time on environment installation, we also prov
```

2. RAG UI
Linux:

- Linux:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些代码都有缩近,和原来的md编写风格改变了,如果要改,建议整体全改,或者另外起一个PR, @wwxxzz 帮忙一起看下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看了一下排版
image
为了迎合这个排版所以改动了缩进

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新的排版我本地渲染的效果是这样的
image


```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui

docker run --network host -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```
docker run --network host -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```

Mac/Windows:
- Mac/Windows:

```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui

docker run -p 8002:8002 -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui pai_rag ui -p 8002 -c http://host.docker.internal:8001/
```
docker run -p 8002:8002 -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui pai_rag ui -p 8002 -c http://host.docker.internal:8001/
```
- Tips: For lower versions of Docker(<=20.10.7)
- You need to add the parameter ```--security-opt seccomp:unconfined```, because numpy will report an "Operation not permitted" error in lower versions.
- Change ```-c http://host.docker.internal:8001/``` to ```-c http://172.17.0.1:8001/```, because lower versions of Docker do not support accessing the host IP via ```host.docker.internal```.

### Build your own image based on Dockerfile

Expand Down
25 changes: 15 additions & 10 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,26 @@ evaluation [-c src/pai_rag/config/settings.yaml] [-o False] [-t retrieval]
```

2. 启动RAG WebUI
Linux:

- Linux:

```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui

docker run --network host -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```
docker run --network host -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```

Mac/Windows:
- Mac/Windows:

```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui
```bash
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui

docker run -p 8002:8002 -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui pai_rag ui -p 8002 -c http://host.docker.internal:8001/
```
docker run -p 8002:8002 -d mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:0.0.2_ui pai_rag ui -p 8002 -c http://host.docker.internal:8001/
```
- Tips:
低版本的docker(<=20.10.7)
- 需要添加参数```--security-opt seccomp:unconfined```这是因为numpy在低版本会报Operation not permitted的错误
- 将```-c http://host.docker.internal:8001/```改为```-c http://172.17.0.1:8001/```这是因为低版本docker不支持```host.docker.internal```访问宿主机ip

### 基于Dockerfile自行构建镜像

Expand Down
Loading