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 compose up -d时出现问题 #30

Closed
RAINighty opened this issue Apr 14, 2023 · 31 comments
Closed

docker compose up -d时出现问题 #30

RAINighty opened this issue Apr 14, 2023 · 31 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested
Milestone

Comments

@RAINighty
Copy link

 => ERROR [builder 7/9] RUN POETRY run python -m spacy download en_core_web_sm                                     2.5s
------
 > [builder 7/9] RUN    POETRY run python -m spacy download en_core_web_sm:
#0 1.360 Skipping virtualenv creation, as specified in config file.
#0 2.380 Traceback (most recent call last):
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
#0 2.380     conn = connection.create_connection(
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
#0 2.380     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
#0 2.380   File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
#0 2.380     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
#0 2.380 socket.gaierror: [Errno -2] Name or service not known
#0 2.380
#0 2.380 During handling of the above exception, another exception occurred:
#0 2.380
#0 2.380 Traceback (most recent call last):
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
#0 2.380     httplib_response = self._make_request(
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
#0 2.380     self._validate_conn(conn)
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
#0 2.380     conn.connect()
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
#0 2.380     self.sock = conn = self._new_conn()
#0 2.380   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
#0 2.380     raise NewConnectionError(
#0 2.380 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f4134786ef0>: Failed to establish a new connection: [Errno -2] Name or service not known
#0 2.380
#0 2.380 During handling of the above exception, another exception occurred:
#0 2.380
#0 2.380 Traceback (most recent call last):
#0 2.380   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
#0 2.381     resp = conn.urlopen(
#0 2.381   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
#0 2.381     retries = retries.increment(
#0 2.381   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
#0 2.381     raise MaxRetryError(_pool, url, error or ResponseError(cause))
#0 2.381 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4134786ef0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
#0 2.381
#0 2.381 During handling of the above exception, another exception occurred:
#0 2.381
#0 2.381 Traceback (most recent call last):
#0 2.381   File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
#0 2.381     return _run_code(code, main_globals, None,
#0 2.381   File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
#0 2.381     exec(code, run_globals)
#0 2.381   File "/usr/local/lib/python3.10/site-packages/spacy/__main__.py", line 4, in <module>
#0 2.381     setup_cli()
#0 2.381   File "/usr/local/lib/python3.10/site-packages/spacy/cli/_util.py", line 74, in setup_cli
#0 2.381     command(prog_name=COMMAND)
#0 2.381   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
#0 2.381     return self.main(*args, **kwargs)
#0 2.381   File "/usr/local/lib/python3.10/site-packages/typer/core.py", line 778, in main
#0 2.381     return _main(
#0 2.381   File "/usr/local/lib/python3.10/site-packages/typer/core.py", line 216, in _main
#0 2.381     rv = self.invoke(ctx)
#0 2.381   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
#0 2.382     return _process_result(sub_ctx.command.invoke(sub_ctx))
#0 2.382   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
#0 2.382     return ctx.invoke(self.callback, **ctx.params)
#0 2.382   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
#0 2.382     return __callback(*args, **kwargs)
#0 2.382   File "/usr/local/lib/python3.10/site-packages/typer/main.py", line 683, in wrapper
#0 2.382     return callback(**use_params)  # type: ignore
#0 2.382   File "/usr/local/lib/python3.10/site-packages/spacy/cli/download.py", line 36, in download_cli
=> CANCELED [builder 4/6] RUN npm i --registry=https://registry.npm.taobao.org                                    2.2s
failed to solve: executor failed running [/bin/sh -c poetry run python -m spacy download en_core_web_sm]: exit code: 1
@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

网络问题。这个包莫名奇妙需要从 github 下载个东西才能运行。。

workaround:

如果你有代理的话可以试试修改 mu sharing_chatobt 的 Dockerfile,让出错这行命令使用代理:

RUN HTTP_PROXY=http://ip:port HTTPS_PROXY=https://ip:port poetry run python -m spacy download en_core_web_sm

(如果实在不行我之后 fork 改一下 chatterbot 的逻辑8)

@cdfmlr cdfmlr added wontfix This will not be worked on and removed wontfix This will not be worked on labels Apr 15, 2023
@cdfmlr cdfmlr mentioned this issue Apr 15, 2023
@RAINighty
Copy link
Author

我代理挂全局也下不了

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

需要在容器内设定代理服务的地址哈(设置环境变量 HTTP(S)_PROXY)。docker 相当于是虚拟机嘛,环境被隔离了,所以不能自动用上咱们宿主机上的代理😭

@RAINighty
Copy link
Author

网络问题。这个包莫名奇妙需要从 github 下载个东西才能运行。。

workaround:

如果你有代理的话可以试试修改 mu sharing_chatobt 的 Dockerfile,让出错这行命令使用代理:

RUN HTTP_PROXY=http://ip:port HTTPS_PROXY=https://ip:port poetry run python -m spacy download en_core_web_sm

(如果实在不行我之后 fork 改一下 chatterbot 的逻辑8)

 => ERROR [builder 7/9] RUN HTTP_PROXY=http://535.ykbkjt.com:53212 HTTPS_PROXY=https://535.ykbkjt.com:53212 poetr  3.3s
------
 > [builder 7/9] RUN HTTP_PROXY=http://535.ykbkjt.com:53212 HTTPS_PROXY=https://535.ykbkjt.com:53212 poetry run python -m spacy download en_core_web_sm:
#0 1.158 Skipping virtualenv creation, as specified in config file.
#0 3.185 Traceback (most recent call last):
#0 3.185   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen
#0 3.185     self._prepare_proxy(conn)
#0 3.185   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy
#0 3.186     conn.connect()
#0 3.186   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 369, in connect
#0 3.186     self._tunnel()
#0 3.186   File "/usr/local/lib/python3.10/http/client.py", line 920, in _tunnel
#0 3.186     (version, code, message) = response._read_status()
#0 3.186   File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
#0 3.186     raise RemoteDisconnected("Remote end closed connection without"
#0 3.186 http.client.RemoteDisconnected: Remote end closed connection without response
#0 3.186
#0 3.186 During handling of the above exception, another exception occurred:
#0 3.186
#0 3.186 Traceback (most recent call last):
#0 3.186   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
#0 3.186     resp = conn.urlopen(
#0 3.186   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
#0 3.186     retries = retries.increment(
#0 3.186   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
#0 3.187     raise MaxRetryError(_pool, url, error or ResponseError(cause))
#0 3.187 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
#0 3.187
#0 3.187 During handling of the above exception, another exception occurred:
#0 3.187
#0 3.187 Traceback (most recent call last):
#0 3.187   File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
#0 3.187     return _run_code(code, main_globals, None,
#0 3.187   File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
#0 3.187     exec(code, run_globals)
#0 3.187   File "/usr/local/lib/python3.10/site-packages/spacy/__main__.py", line 4, in <module>
#0 3.187     setup_cli()
#0 3.187   File "/usr/local/lib/python3.10/site-packages/spacy/cli/_util.py", line 74, in setup_cli
#0 3.187     command(prog_name=COMMAND)
#0 3.187   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
#0 3.187     return self.main(*args, **kwargs)
#0 3.187   File "/usr/local/lib/python3.10/site-packages/typer/core.py", line 778, in main
#0 3.187     return _main(
#0 3.187   File "/usr/local/lib/python3.10/site-packages/typer/core.py", line 216, in _main
#0 3.187     rv = self.invoke(ctx)
#0 3.187   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
#0 3.188     return _process_result(sub_ctx.command.invoke(sub_ctx))
#0 3.188   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
#0 3.188     return ctx.invoke(self.callback, **ctx.params)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
#0 3.188     return __callback(*args, **kwargs)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/typer/main.py", line 683, in wrapper
#0 3.188     return callback(**use_params)  # type: ignore
#0 3.188   File "/usr/local/lib/python3.10/site-packages/spacy/cli/download.py", line 36, in download_cli
#0 3.188     download(model, direct, sdist, *ctx.args)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/spacy/cli/download.py", line 70, in download
#0 3.188     compatibility = get_compatibility()
#0 3.188   File "/usr/local/lib/python3.10/site-packages/spacy/cli/download.py", line 97, in get_compatibility
#0 3.188     r = requests.get(about.__compatibility__)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
#0 3.188     return request("get", url, params=params, **kwargs)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
#0 3.188     return session.request(method=method, url=url, **kwargs)
#0 3.188   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
#0 3.189     resp = self.send(prep, **send_kwargs)
#0 3.189   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
#0 3.189     r = adapter.send(request, **kwargs)
#0 3.189   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 559, in send
#0 3.189     raise ProxyError(e, request=request)
#0 3.189 requests.exceptions.ProxyError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
------
failed to solve: executor failed running [/bin/sh -c HTTP_PROXY=http://535.ykbkjt.com:53212 HTTPS_PROXY=https://535.ykbkjt.com:53212 poetry run python -m spacy download en_core_web_sm]: exit code: 1

YWFC 5UFFJOFYL 1F{Q{{ 6
QL7MT)GD9MANOV~QVILYSDL
使用代理后依然出现相同问题,是我操作有误吗?

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

不能直接发到人家的服务器上吧,协议不对了。需要用你本机上的代理服务转发。

docker <-> HTTP <-> 你本地的代理软件 <-> 某种代理协议 <-> 代理服务器 <-> HTTP <-> GitHub

@RAINighty
Copy link
Author

RAINighty commented Apr 15, 2023

S PYLY9QJAGHMJD_06RNE
已经改不明白了,大佬救救(后面那个https_proxy里改成了https://127.0.0.1也不行)
PSDJBJ @B ZU X1K4CFIY6

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

@RAINighty
Copy link
Author

改为host.docker.internal后
1.加端口号10809仍然错误
2.不加端口号则卡住
ICPS)FZ~%YF C~T5UHC1F(E

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

  1. 要加端口号
  2. HTTPS_PROXY=http://... 不要 =https://...

@RAINighty
Copy link
Author

我超好了,大佬nb

@RAINighty
Copy link
Author

KJ00FTH VX)8@LJZF~ZSAHH
TXEBJW2GSJN@OU SS61ECDF
docker compuse up -d后audioview和live2dview在不停的重启

@RAINighty
Copy link
Author

KJ00FTH VX)8@LJZF~ZSAHH TXEBJW2GSJN@OU SS61ECDF docker compuse up -d后audioview和live2dview在不停的重启

2023-04-15 16:05:55 muvtuber-audioview-1          | 2023/04/15 08:05:54 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:55 muvtuber-audioview-1          | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:55 muvtuber-audioview-1          | 2023/04/15 08:05:54 [notice] 1#1: try again to bind() after 500ms
2023-04-15 16:05:55 muvtuber-audioview-1          | 2023/04/15 08:05:54 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:55 muvtuber-audioview-1          | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:55 muvtuber-audioview-1          | 2023/04/15 08:05:54 [notice] 1#1: try again to bind() after 500ms
2023-04-15 16:05:56 muvtuber-audioview-1          | 2023/04/15 08:05:54 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:56 muvtuber-audioview-1          | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:05:56 muvtuber-audioview-1          | 2023/04/15 08:05:54 [notice] 1#1: try again to bind() after 500ms
1970-01-01 08:00:00 muvtuber-audioview-1 exited with code 1
2023-04-15 16:06:30 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:30 muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:30 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [notice] 1#1: try again to bind() after 500ms
2023-04-15 16:06:31 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:31 muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:31 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [notice] 1#1: try again to bind() after 500ms
2023-04-15 16:06:31 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:31 muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
2023-04-15 16:06:31 muvtuber-live2dview-1         | 2023/04/15 08:06:29 [notice] 1#1: try again to bind() after 500ms
1970-01-01 08:00:00 muvtuber-live2dview-1 exited with code 1

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

?

麻烦给我看一下你的 docker-compose.yml 😂

@RAINighty
Copy link
Author

version: '3'
services:
  blivechat:
    image: cdfmlr/muvtuber-blivechat:v1.6.1-muvtb.2
    build: ./blivechat/
    ports:
      - "127.0.0.1:51060:12450"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    networks:
      - default
    restart: unless-stopped
  emotext:
    image: cdfmlr/muvtuber-emotext:v0.0.1
    build: ./emotext/
    ports:
      - "127.0.0.1:51061:9003"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    restart: unless-stopped
  chatgpt_chatbot:
    image: cdfmlr/muvtuber-chatgpt_chatbot:v0.0.2
    build: ./chatgpt_chatbot/
    ports:
      - "127.0.0.1:51052:50052"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    networks:
      - default
    environment:
      # 192.168.5.2 是我的 docker vm 访问宿主机的 ip
      # 需要根据每个人的情况具体设置。
      - HTTP_PROXY=http://host.docker.internal:10809
      - HTTPS_PROXY=http://host.docker.internal:10809
    restart: unless-stopped
  musharing_chatbot:
    image: cdfmlr/muvtuber-musharing_chatbot:v0.0.1
    build: ./musharing_chatbot/
    ports:
      - "127.0.0.1:51051:50051"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    restart: unless-stopped
  live2ddriver:
    image: cdfmlr/muvtuber-live2ddriver:v0.0.2
    build: ./live2ddriver/
    ports:
      - "127.0.0.1:51071:9001"
      - "127.0.0.1:51072:9002"
      - "127.0.0.1:51074:9004"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    links:
      - emotext
    environment:
      - EMOTEXT_SERVER=http://emotext:9003
    depends_on:
      - emotext
    restart: unless-stopped
  live2dview:
    image: cdfmlr/muvtuber-live2dview:v0.0.1
    build: ./live2dview/
    ports:
      - "127.0.0.1:51070:80"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    restart: unless-stopped
  externalsayer:
    image: cdfmlr/muvtuber-externalsayer:v0.0.2
    build: ./externalsayer/
    ports:
      - "127.0.0.1:51065:50010"
    volumes:
      - ./configs/externalsayer:/app/config
    restart: unless-stopped
  audioview:
    image: cdfmlr/muvtuber-audioview:v0.0.1
    build: ./audioview/
    ports:
      - "51082:80"
    restart: unless-stopped
  muvtuberdriver:
    image: cdfmlr/muvtuber-muvtuberdriver:v0.0.2
    build: ./muvtuberdriver/
    ports:
      - "127.0.0.1:51080:51080"
      - "127.0.0.1:51081:51081"
    volumes:
      - ./configs/muvtuberdriver:/app/config
    depends_on:
      - blivechat
      - live2ddriver
      - musharing_chatbot
      - chatgpt_chatbot
      - externalsayer
    restart: unless-stopped
networks:
  default:
    driver: bridge

@cdfmlr

This comment was marked as off-topic.

@RAINighty
Copy link
Author

G:\muvtuber>docker ps
CONTAINER ID   IMAGE                                      COMMAND                  CREATED          STATUS
            PORTS                                                                             NAMES
80ce8d9c0fbc   cdfmlr/muvtuber-muvtuberdriver:v0.0.2      "/app/muvtuberdriver…"   50 seconds ago   Up 46 seconds                   127.0.0.1:51080-51081->51080-51081/tcp                                            muvtuber-muvtuberdriver-1
2530fcee93f4   cdfmlr/muvtuber-live2ddriver:v0.0.2        "/app/live2ddriver.o…"   51 seconds ago   Up 48 seconds                   127.0.0.1:51071->9001/tcp, 127.0.0.1:51072->9002/tcp, 127.0.0.1:51074->9004/tcp   muvtuber-live2ddriver-1
59c79749edfb   cdfmlr/muvtuber-blivechat:v1.6.1-muvtb.2   "python3 main.py --h…"   51 seconds ago   Up 49 seconds                   127.0.0.1:51060->12450/tcp                                                        muvtuber-blivechat-1
2d06e26afc3a   cdfmlr/muvtuber-emotext:v0.0.1             "/bin/sh -c 'cd /app…"   51 seconds ago   Up 49 seconds                   127.0.0.1:51061->9003/tcp                                                         muvtuber-emotext-1
5b4ad3dadb98   cdfmlr/muvtuber-chatgpt_chatbot:v0.0.2     "/bin/sh -c 'cd /app…"   51 seconds ago   Up 49 seconds                   127.0.0.1:51052->50052/tcp                                                        muvtuber-chatgpt_chatbot-1322c12938243   cdfmlr/muvtuber-externalsayer:v0.0.2       "/app/externalsayer.…"   51 seconds ago   Up 48 seconds                   127.0.0.1:51065->50010/tcp                                                        muvtuber-externalsayer-1
351ba1b219ad   cdfmlr/muvtuber-audioview:v0.0.1           "/docker-entrypoint.…"   51 seconds ago   Restarting (1) 12 seconds ago                                                                                     muvtuber-audioview-1
7225c70e3979   cdfmlr/muvtuber-musharing_chatbot:v0.0.1   "/bin/sh -c 'cd /app…"   51 seconds ago   Up 48 seconds                   127.0.0.1:51051->50051/tcp                                                        muvtuber-musharing_chatbot-1
75201e63450c   cdfmlr/muvtuber-live2dview:v0.0.1          "/docker-entrypoint.…"   51 seconds ago   Restarting (1) 12 seconds ago                                                                                     muvtuber-live2dview-1

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

我不理解😭

试试 adding

CMD ["nginx", "-g", "daemon off;"]

at the end of the Dockerfile (audioview 和 live2dview 的).

reference:

@RAINighty
Copy link
Author

RAINighty commented Apr 15, 2023

我不理解😭

试试 adding

CMD ["nginx", "-g", "daemon off;"]

at the end of the Dockerfile (audioview 和 live2dview 的).

reference:

修改后删了之前的Image重新弄仍然这样。cmd没有弹出错误

muvtuber-live2dview-1         | 2023/04/15 08:24:01 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [notice] 1#1: try again to bind() after 500ms
muvtuber-audioview-1          | 2023/04/15 08:24:00 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-audioview-1          | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-audioview-1          | 2023/04/15 08:24:00 [notice] 1#1: try again to bind() after 500ms
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [notice] 1#1: try again to bind() after 500ms
muvtuber-audioview-1          | 2023/04/15 08:24:00 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-audioview-1          | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-audioview-1          | 2023/04/15 08:24:00 [notice] 1#1: try again to bind() after 500ms
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [notice] 1#1: try again to bind() after 500ms
muvtuber-audioview-1          | 2023/04/15 08:24:00 [emerg] 1#1: still could not bind()
muvtuber-audioview-1          | nginx: [emerg] still could not bind()
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [notice] 1#1: try again to bind() after 500ms
muvtuber-audioview-1 exited with code 1
muvtuber-live2dview-1         | 2023/04/15 08:24:01 [emerg] 1#1: still could not bind()
muvtuber-live2dview-1         | nginx: [emerg] still could not bind()
muvtuber-live2dview-1 exited with code 1

@RAINighty
Copy link
Author

我是傻逼,刚刚查了一下谁在用80,然后发现steamcommunity302在占用,关掉之后就好了

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

但是不应该呀,每个容器的 0.0.0.0:80 应该都是互相隔离的,也与宿主机网络隔离

@RAINighty
Copy link
Author

不清楚,而且又出现了问题
1.日志里一直出现muvtuber-blivechat-1 | 2023-04-15 08:36:48 INFO [services.avatar]: Failed to fetch avatar: code=-401 非法访问 uid=1820285361
2.访问Live2DViewhttp://localhost:51070/#/?driver=ws://localhost:51071/live2d和Blivechathttp://localhost:12450/出现拒绝连接请求
3.访问AudioViewhttp://127.0.0.1:51082/?controller=ws://127.0.0.1:51081/有网站标题但是全白无内容
MZW3M(24QO5{9M5( (1C7GM
4.即使直接配置到OBS里也无内容
UMM 8@~3 GN@582Q0GYIY{Y

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

  1. 获取头像失败是正常的。

  2. 抱歉我文档写错了,blivechat 的端口被 docker 转发了嘛,所以应该是 51060 而非 12450

blivechat:
image: cdfmlr/muvtuber-blivechat:v1.6.1-muvtb.2
build: ./blivechat/
ports:
- "127.0.0.1:51060:12450"

但是 live2dview 不应该拒绝服务。

  1. AudioView 被设计为空白的,不是 bug。他只用于输出声音,没有画面(日后可能会加入字幕显示,但目前不支持)。如果需要验证是否正确工作,可以打开浏览器开发者工具 > 网络,查看是否正确建立了一个 WebSocket 连接。

@RAINighty
Copy link
Author

RAINighty commented Apr 15, 2023

  1. 获取头像失败是正常的。
  2. 抱歉我文档写错了,blivechat 的端口被 docker 转发了嘛,所以应该是 51060 而非 12450

blivechat:
image: cdfmlr/muvtuber-blivechat:v1.6.1-muvtb.2
build: ./blivechat/
ports:
- "127.0.0.1:51060:12450"

但是 live2dview 不应该拒绝服务。

  1. AudioView 被设计为空白的,不是 bug。他只用于输出声音,没有画面(日后可能会加入字幕显示,但目前不支持)。如果需要验证是否正确工作,可以打开浏览器开发者工具 > 网络,查看是否正确建立了一个 WebSocket 连接。

2.所以应该写为127.0.0.1:51060?
UQX{}DYQ{PZ) Q}1%@_)P
仍然拒绝,telnet说明连接失败

chatgpt似乎一直出现网络问题,但是我的proxy配置没有问题啊

  chatgpt_chatbot:
    image: cdfmlr/muvtuber-chatgpt_chatbot:v0.0.2
    build: ./chatgpt_chatbot/
    ports:
      - "127.0.0.1:51052:50052"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    networks:
      - default
    environment:
      # 192.168.5.2 是我的 docker vm 访问宿主机的 ip
      # 需要根据每个人的情况具体设置。
      - HTTP_PROXY=http://host.docker.internal:10809
      - HTTPS_PROXY=http://host.docker.internal:10809
muvtuber-chatgpt_chatbot-1    |     self._prepare_proxy(conn)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy
muvtuber-chatgpt_chatbot-1    |     conn.connect()
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
muvtuber-chatgpt_chatbot-1    |     self.sock = conn = self._new_conn()
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
muvtuber-chatgpt_chatbot-1    |     raise NewConnectionError(
muvtuber-chatgpt_chatbot-1    | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f968bfdbac0>: Failed to establish a new connection: [Errno -2] Name or service not known
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | During handling of the above exception, another exception occurred:
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | Traceback (most recent call last):
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
muvtuber-chatgpt_chatbot-1    |     resp = conn.urlopen(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
muvtuber-chatgpt_chatbot-1    |     retries = retries.increment(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
muvtuber-chatgpt_chatbot-1    |     raise MaxRetryError(_pool, url, error or ResponseError(cause))
muvtuber-chatgpt_chatbot-1    | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f968bfdbac0>: Failed to establish a new connection: [Errno -2] Name or service not known')))
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | During handling of the above exception, another exception occurred:
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | Traceback (most recent call last):
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/grpc/_server.py", line 444, in _call_behavior
muvtuber-chatgpt_chatbot-1    |     response_or_iterator = behavior(argument, context)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/grpcapi.py", line 37, in NewSession
muvtuber-chatgpt_chatbot-1    |     session_id = self.multiChatGPT.new_session(config)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 289, in new_session
muvtuber-chatgpt_chatbot-1    |     self.chatgpts[session_id] = ChatGPTProxy(
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 189, in __init__
muvtuber-chatgpt_chatbot-1    |     self.renew()
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 193, in renew
muvtuber-chatgpt_chatbot-1    |     self.chatgpt = self._new_chatgpt(self.config)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 207, in _new_chatgpt
muvtuber-chatgpt_chatbot-1    |     new_chatgpt = ChatGPTv3(config={
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 94, in __init__
muvtuber-chatgpt_chatbot-1    |     self.chatbot = ChatbotV3(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/revChatGPT/V3.py", line 68, in __init__
muvtuber-chatgpt_chatbot-1    |     if self.get_token_count("default") > self.max_tokens:
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/revChatGPT/V3.py", line 116, in get_token_count
muvtuber-chatgpt_chatbot-1    |     encoding = tiktoken.encoding_for_model(self.engine)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/model.py", line 75, in encoding_for_model
muvtuber-chatgpt_chatbot-1    |     return get_encoding(encoding_name)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding
muvtuber-chatgpt_chatbot-1    |     enc = Encoding(**constructor())
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 64, in cl100k_base
muvtuber-chatgpt_chatbot-1    |     mergeable_ranks = load_tiktoken_bpe(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 114, in load_tiktoken_bpe
muvtuber-chatgpt_chatbot-1    |     contents = read_file_cached(tiktoken_bpe_file)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached
muvtuber-chatgpt_chatbot-1    |     contents = read_file(blobpath)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file
muvtuber-chatgpt_chatbot-1    |     return requests.get(blobpath).content
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
muvtuber-chatgpt_chatbot-1    |     return request("get", url, params=params, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
muvtuber-chatgpt_chatbot-1    |     return session.request(method=method, url=url, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
muvtuber-chatgpt_chatbot-1    |     resp = self.send(prep, **send_kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
muvtuber-chatgpt_chatbot-1    |     r = adapter.send(request, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 559, in send
muvtuber-chatgpt_chatbot-1    |     raise ProxyError(e, request=request)
muvtuber-chatgpt_chatbot-1    | requests.exceptions.ProxyError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f968bfdbac0>: Failed to establish a new connection: [Errno -2] Name or service not known')))

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

我查看了一下官方文档,可能 Docker 在 Windows 下的一些行为不太一样,导致了你的各种问题(我觉得你的有点像在用 host 模式的网络)。

可以尝试修改一些可疑的 docker-compose.yml 配置(这些都是我按照 Linux 的习惯写的,并且在 macOS 下可以正常工作,Windows 也许不兼容😂):

  1. 修改所有 ports 设置,去掉 127.0.0.1
ports:
      - "127.0.0.1:51052:50052"

改为:

ports:
      - 51052:50052
  1. 删除有关 bridge 的网络配置:

networks:
- default

networks:
- default

muvtuber/docker-compose.yml

Lines 103 to 105 in 8402761

networks:
default:
driver: bridge

(也许不能在 windows 用 bridge?)

我不保证有用😭

@RAINighty
Copy link
Author

RAINighty commented Apr 15, 2023

blivechat和live2dview页面成功打开了,但是chatgpt仍然报错(宿主机访问chatgpt网站无问题)

muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | During handling of the above exception, another exception occurred:
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | Traceback (most recent call last):
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen
muvtuber-chatgpt_chatbot-1    |     self._prepare_proxy(conn)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy
muvtuber-chatgpt_chatbot-1    |     conn.connect()
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
muvtuber-chatgpt_chatbot-1    |     self.sock = conn = self._new_conn()
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
muvtuber-chatgpt_chatbot-1    |     raise NewConnectionError(
muvtuber-chatgpt_chatbot-1    | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fee691204c0>: Failed to establish a new connection: [Errno -2] Name or service not known
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | During handling of the above exception, another exception occurred:
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | Traceback (most recent call last):
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
muvtuber-chatgpt_chatbot-1    |     resp = conn.urlopen(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
muvtuber-chatgpt_chatbot-1    |     retries = retries.increment(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
muvtuber-chatgpt_chatbot-1    |     raise MaxRetryError(_pool, url, error or ResponseError(cause))
muvtuber-chatgpt_chatbot-1    | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fee691204c0>: Failed to establish a new connection: [Errno -2] Name or service not known')))
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | During handling of the above exception, another exception occurred:
muvtuber-chatgpt_chatbot-1    | 
muvtuber-chatgpt_chatbot-1    | Traceback (most recent call last):
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/grpc/_server.py", line 444, in _call_behavior
muvtuber-chatgpt_chatbot-1    |     response_or_iterator = behavior(argument, context)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/grpcapi.py", line 37, in NewSession
muvtuber-chatgpt_chatbot-1    |     session_id = self.multiChatGPT.new_session(config)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 289, in new_session
muvtuber-chatgpt_chatbot-1    |     self.chatgpts[session_id] = ChatGPTProxy(
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 189, in __init__
muvtuber-chatgpt_chatbot-1    |     self.renew()
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 193, in renew
muvtuber-chatgpt_chatbot-1    |     self.chatgpt = self._new_chatgpt(self.config)
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 207, in _new_chatgpt
muvtuber-chatgpt_chatbot-1    |     new_chatgpt = ChatGPTv3(config={
muvtuber-chatgpt_chatbot-1    |   File "/app/chatgpt/chatbot.py", line 94, in __init__
muvtuber-chatgpt_chatbot-1    |     self.chatbot = ChatbotV3(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/revChatGPT/V3.py", line 68, in __init__
muvtuber-chatgpt_chatbot-1    |     if self.get_token_count("default") > self.max_tokens:
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/revChatGPT/V3.py", line 116, in get_token_count
muvtuber-chatgpt_chatbot-1    |     encoding = tiktoken.encoding_for_model(self.engine)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/model.py", line 75, in encoding_for_model
muvtuber-chatgpt_chatbot-1    |     return get_encoding(encoding_name)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding
muvtuber-chatgpt_chatbot-1    |     enc = Encoding(**constructor())
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 64, in cl100k_base
muvtuber-chatgpt_chatbot-1    |     mergeable_ranks = load_tiktoken_bpe(
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 114, in load_tiktoken_bpe
muvtuber-chatgpt_chatbot-1    |     contents = read_file_cached(tiktoken_bpe_file)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached
muvtuber-chatgpt_chatbot-1    |     contents = read_file(blobpath)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file
muvtuber-chatgpt_chatbot-1    |     return requests.get(blobpath).content
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
muvtuber-chatgpt_chatbot-1    |     return request("get", url, params=params, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
muvtuber-chatgpt_chatbot-1    |     return session.request(method=method, url=url, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
muvtuber-chatgpt_chatbot-1    |     resp = self.send(prep, **send_kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
muvtuber-chatgpt_chatbot-1    |     r = adapter.send(request, **kwargs)
muvtuber-chatgpt_chatbot-1    |   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 559, in send
muvtuber-chatgpt_chatbot-1    |     raise ProxyError(e, request=request)
muvtuber-chatgpt_chatbot-1    | requests.exceptions.ProxyError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fee691204c0>: Failed to establish a new connection: [Errno -2] Name or service not known')))

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 15, 2023

blivechat和live2dview页面成功打开了

问一下如何解决的😂我之后好做相应的修改🙏

但是chatgpt仍然报错(宿主机访问chatgpt网站无问题)

注意到日志有提及 ProxyErrorName or service not known,是不是说明现在容器内部又不能用 http://host.docker.internal:10809 这个地址啦 😭 也许换成 IP 就可以了?可以尝试进入容器 hack 一下:

docker compose exec chatgpt_chatbot sh
apt-get update
apt-get install inetutils-ping

# 下面就是各种尝试 ping 了😭
ping host.docker.internal
ping ...

具体寻找 host ip 的方法可以参考:

@RAINighty
Copy link
Author

RAINighty commented Apr 15, 2023

blivechat和live2dview页面成功打开了

问一下如何解决的😂我之后好做相应的修改🙏

但是chatgpt仍然报错(宿主机访问chatgpt网站无问题)

注意到日志有提及 ProxyErrorName or service not known,是不是说明现在容器内部又不能用 http://host.docker.internal:10809 这个地址啦 😭 也许换成 IP 就可以了?可以尝试进入容器 hack 一下:

docker compose exec chatgpt_chatbot sh
apt-get update
apt-get install inetutils-ping

# 下面就是各种尝试 ping 了😭
ping host.docker.internal
ping ...

具体寻找 host ip 的方法可以参考:

按照这个修改就能使用blivechat和live2dview了

我查看了一下官方文档,可能 Docker 在 Windows 下的一些行为不太一样,导致了你的各种问题(我觉得你的有点像在用 host 模式的网络)。

可以尝试修改一些可疑的 docker-compose.yml 配置(这些都是我按照 Linux 的习惯写的,并且在 macOS 下可以正常工作,Windows 也许不兼容😂):

  1. 修改所有 ports 设置,去掉 127.0.0.1
ports:
      - "127.0.0.1:51052:50052"

改为:

ports:
      - 51052:50052
  1. 删除有关 bridge 的网络配置:

networks:
- default

networks:
- default

muvtuber/docker-compose.yml

Lines 103 to 105 in 8402761

networks:
default:
driver: bridge

(也许不能在 windows 用 bridge?)

我不保证有用😭

chatgpt的话我通过docker desktop的settings-resources-proxies写了宿主机的ip(我写的就是宿主机以太网下的本地ipv4地址)能正常使用了
但是又出现了audioview没有声音的问题😂

2023-04-16 00:41:16 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
2023-04-16 00:41:16 /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
2023-04-16 00:41:16 /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
2023-04-16 00:41:16 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
2023-04-16 00:41:16 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
2023-04-16 00:41:16 /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2023-04-16 00:41:16 /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2023-04-16 00:41:16 /docker-entrypoint.sh: Configuration complete; ready for start up
2023-04-16 00:46:11 172.20.0.1 - - [15/Apr/2023:16:46:11 +0000] "GET /?controller=ws://127.0.0.1:51081/ HTTP/1.1" 200 467 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 OBS/29.0.2 Safari/537.36" "-"
2023-04-16 00:46:11 172.20.0.1 - - [15/Apr/2023:16:46:11 +0000] "GET /assets/index-80b45ff1.js HTTP/1.1" 200 93145 "http://127.0.0.1:51082/?controller=ws://127.0.0.1:51081/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 OBS/29.0.2 Safari/537.36" "-"
2023-04-16 00:46:11 172.20.0.1 - - [15/Apr/2023:16:46:11 +0000] "GET /assets/index-1583fd6e.css HTTP/1.1" 200 1133 "http://127.0.0.1:51082/?controller=ws://127.0.0.1:51081/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 OBS/29.0.2 Safari/537.36" "-"
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: using the "epoll" event method
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: nginx/1.23.3
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: OS: Linux 5.15.90.1-microsoft-standard-WSL2
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker processes
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 30
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 31
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 32
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 33
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 34
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 35
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 36
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 37
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 38
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 39
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 40
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 41
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 42
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 43
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 44
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 45
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 46
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 47
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 48
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 49
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 50
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 51
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 52
2023-04-16 00:41:16 2023/04/15 16:41:16 [notice] 1#1: start worker process 53

我的externalsayer的config

SrvAddr: "localhost:50010"
EnabledSayer: "azure"
AzureSayer:
  SpeechKey: "xxxxxxxxxxx"
  SpeechRegion: "southeastasia"
  FormatMicrosoft: "audio-16khz-32kbitrate-mono-mp3"
  FormatMimeSubtype: "mp3"
  Roles:
    "default": '<speak version="1.0" xml:lang="zh-CN"><voice name="testNeural">{{.}}</voice></speak>'

可能是我不清楚如何填写azure导致的吧
YECSNN6}V`A~B2$T7@KBA

RK(2B$ZMX}7I8(Z UU$H`R7

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 16, 2023

但是又出现了audioview没有声音的问题
我的externalsayer的config

那这个应该是 externalsayer (文本 -> 音频)的问题,而非 audioview (音频 -> 播放),这是两个独立的模块。

<voice name="testNeural"> 不正确,这里的 name 应该填写 voice,即“发音人”的名字。具体的列表可以通过以下命令获取:

curl https://eastus.tts.speech.microsoft.com/cognitiveservices/voices/list --header 'Ocp-Apim-Subscription-Key: xxx'

我把请求的结果格式化放到了这个文件里,方便查找:externalsayer/azuresayer/voices /voices-list.json

可以在网页上的「Speech Studio」里试听、选择声音。然后在文件里找到对应 voice 的 "ShortName": "xx-XX-Xxx" 填写到 <voice name="xx-XX-Xxx">

其实更推荐的一种方式是,在「Speech Studio」中随便写点内容,选择声音让它说,并微调各种参数,满意之后,把 SSML 导出出来,把内容替换为 {{.}},去掉换行(我写了个脚本帮助做这件事,可以点这里找到)写到配置里。

This was referenced Apr 16, 2023
@cdfmlr cdfmlr added bug Something isn't working documentation Improvements or additions to documentation question Further information is requested labels Apr 16, 2023
@cdfmlr cdfmlr added this to the v0.3.2 milestone Apr 16, 2023
cdfmlr added a commit that referenced this issue Apr 16, 2023
- refactor: MusharingChatbot -> v2 chatbotapi
  - fix #27
- build: docker network debug
  - apply changes from #30
- docs: update README:
  - add help to externalsayer
  - add troubleshooting
@cdfmlr cdfmlr removed this from the v0.3.2 milestone Apr 16, 2023
@RAINighty
Copy link
Author

但是又出现了audioview没有声音的问题
我的externalsayer的config

那这个应该是 externalsayer (文本 -> 音频)的问题,而非 audioview (音频 -> 播放),这是两个独立的模块。

<voice name="testNeural"> 不正确,这里的 name 应该填写 voice,即“发音人”的名字。具体的列表可以通过以下命令获取:

curl https://eastus.tts.speech.microsoft.com/cognitiveservices/voices/list --header 'Ocp-Apim-Subscription-Key: xxx'

我把请求的结果格式化放到了这个文件里,方便查找:externalsayer/azuresayer/voices /voices-list.json

可以在网页上的「Speech Studio」里试听、选择声音。然后在文件里找到对应 voice 的 "ShortName": "xx-XX-Xxx" 填写到 <voice name="xx-XX-Xxx">

其实更推荐的一种方式是,在「Speech Studio」中随便写点内容,选择声音让它说,并微调各种参数,满意之后,把 SSML 导出出来,把内容替换为 {{.}},去掉换行(我写了个脚本帮助做这件事,可以点这里找到)写到配置里。

QU$D N~09@84CI{ZR}DURKA
我估计是因为我训练的自定义语音模型,但是还没有权限部署所导致的(发音人估计也是写错了)

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 17, 2023

我估计是因为我训练的自定义语音模型,但是还没有权限部署所导致的(发音人估计也是写错了)

👌🏻

@cdfmlr
Copy link
Owner

cdfmlr commented Apr 17, 2023

And thanks for all your debugging and discussing contributions. I believe I have merged most code/docs changes into the v0.3.2 (this version is named NightyRain as a mark of appreciation). However I am concerned that this threading is off-topic now and could make troubles for tracking and for people seeking help. I am closing it. Feel free to open new issues or reopen this one for further discussion.

@cdfmlr cdfmlr closed this as completed Apr 17, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in project-muvtuber Apr 17, 2023
@cdfmlr cdfmlr added this to the v0.3.2 milestone Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

2 participants