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

[Doc][Module Name] docker build error #2076

Open
1 of 2 tasks
NgocKhanhC311 opened this issue Oct 17, 2024 · 0 comments
Open
1 of 2 tasks

[Doc][Module Name] docker build error #2076

NgocKhanhC311 opened this issue Oct 17, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation Waiting for reply

Comments

@NgocKhanhC311
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

┌──(kali㉿kali)-[~/DB-GPT]
└─$ bash docker/build_all_images.shbash docker/build_all_images.sh \
--base-image nvidia/cuda:11.8.0-runtime-ubuntu22.04 \
--pip-index-url https://pypi.tuna.tsinghua.edu.cn/simple \
--language zh
                                                                                                                                                                                                                   
┌──(kali㉿kali)-[~/DB-GPT]
└─$ 
                                                                                                                                                                                                                   
┌──(kali㉿kali)-[~/DB-GPT]
└─$ bash docker/build_all_images.sh \
--base-image nvidia/cuda:11.8.0-runtime-ubuntu22.04 \
--pip-index-url https://pypi.tuna.tsinghua.edu.cn/simple \
--language zh
Begin build docker image, base image: nvidia/cuda:11.8.0-runtime-ubuntu22.04, target image name: eosphorosai/dbgpt
[+] Building 396.0s (11/14)                                                                                                                                                                         docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 2.41kB                                                                                                                                                                        0.0s 
 => [internal] load metadata for docker.io/nvidia/cuda:11.8.0-runtime-ubuntu22.04                                                                                                                             6.0s 
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 220B                                                                                                                                                                             0.0s 
 => [ 1/10] FROM docker.io/nvidia/cuda:11.8.0-runtime-ubuntu22.04@sha256:eaaccb3528ceca110601131434ab467e41d694a41e8c9bf280fb27ac18fcb29b                                                                   189.6s 
 => => resolve docker.io/nvidia/cuda:11.8.0-runtime-ubuntu22.04@sha256:eaaccb3528ceca110601131434ab467e41d694a41e8c9bf280fb27ac18fcb29b                                                                       0.0s
 => => sha256:eaaccb3528ceca110601131434ab467e41d694a41e8c9bf280fb27ac18fcb29b 743B / 743B                                                                                                                    0.0s 
 => => sha256:7c8e5ee1e8531f0d19f8d7e78c5b7efa9c455697fa96e62f083f361d6842e452 2.21kB / 2.21kB                                                                                                                0.0s 
 => => sha256:d8fb74ecc8b26b5fae3ced43455e67e1f42dbc6a7b24102884fa038537da7f67 12.02kB / 12.02kB                                                                                                              0.0s 
 => => sha256:5e3b7ee7738140e8f4608c3945b6e1ed4f9fb75db53a04e19ba0a6661e7cc4fe 4.62MB / 4.62MB                                                                                                                7.1s 
 => => sha256:5bd037f007fdda13ae5a5f43a199d6677db1f9059c2980c84726e3a43fab169a 56.23MB / 56.23MB                                                                                                              8.2s
 => => sha256:4cda774ad2ecef28c9a1cd97594f7199071c83769f91c5d109eb1cb6770ecdff 188B / 188B                                                                                                                    1.8s
 => => sha256:775f22adee620daec0db645bad7027db4c1ecf22520412e1b2466fc73d54d19b 6.88kB / 6.88kB                                                                                                                2.5s
 => => sha256:263fc748118f7937f811e3e9c9355318db07dd2dd1dccc370dadaa7d0b5ed692 1.38GB / 1.38GB                                                                                                              102.0s
 => => extracting sha256:5e3b7ee7738140e8f4608c3945b6e1ed4f9fb75db53a04e19ba0a6661e7cc4fe                                                                                                                     4.0s
 => => sha256:16c36d0187d03bd0de84d870ded86c45fabd78f4bfdb2ed90177e5fc4dd33d11 63.70kB / 63.70kB                                                                                                              7.9s
 => => sha256:e7a56570655c990ecc804c77873efc83f9a6c31064e3e8a5dc02430213f2d74c 1.69kB / 1.69kB                                                                                                                8.5s
 => => sha256:507fc9045cbad45c1c4ca554a6453fe0a1c9ae74667db0612fec7475256d5c23 1.52kB / 1.52kB                                                                                                                8.8s
 => => extracting sha256:5bd037f007fdda13ae5a5f43a199d6677db1f9059c2980c84726e3a43fab169a                                                                                                                    16.9s
 => => extracting sha256:4cda774ad2ecef28c9a1cd97594f7199071c83769f91c5d109eb1cb6770ecdff                                                                                                                     0.0s
 => => extracting sha256:775f22adee620daec0db645bad7027db4c1ecf22520412e1b2466fc73d54d19b                                                                                                                     0.0s
 => => extracting sha256:263fc748118f7937f811e3e9c9355318db07dd2dd1dccc370dadaa7d0b5ed692                                                                                                                    87.0s
 => => extracting sha256:16c36d0187d03bd0de84d870ded86c45fabd78f4bfdb2ed90177e5fc4dd33d11                                                                                                                     0.0s 
 => => extracting sha256:e7a56570655c990ecc804c77873efc83f9a6c31064e3e8a5dc02430213f2d74c                                                                                                                     0.0s 
 => => extracting sha256:507fc9045cbad45c1c4ca554a6453fe0a1c9ae74667db0612fec7475256d5c23                                                                                                                     0.0s 
 => [internal] load build context                                                                                                                                                                            26.4s 
 => => transferring context: 330.82MB                                                                                                                                                                        26.4s 
 => [ 2/10] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y git python3 pip     wget sqlite3 tzdata libpq-dev default-libmysqlclient-dev     && apt-get clean                       128.2s 
 => [ 3/10] RUN mkdir -p /app                                                                                                                                                                                 0.7s 
 => [ 4/10] COPY ./setup.py /app/setup.py                                                                                                                                                                     0.1s 
 => [ 5/10] COPY ./README.md /app/README.md                                                                                                                                                                   0.1s 
 => [ 6/10] WORKDIR /app                                                                                                                                                                                      0.1s 
 => ERROR [ 7/10] RUN pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple     && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple ".[default]"     && pip3 install -i https://py  71.0s 
------                                                                                                                                                                                                             
 > [ 7/10] RUN pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple     && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple ".[default]"     && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple ".[openai]":                                                                                                                                                                                       
1.830 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple                                                                                                                                                 
1.830 Requirement already satisfied: pip in /usr/lib/python3/dist-packages (22.0.2)                                                                                                                                
6.829 Collecting pip                                                                                                                                                                                               
8.239   Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d4/55/90db48d85f7689ec6f81c0db0622d704306c5284850383c090e6c7195a5c/pip-24.2-py3-none-any.whl (1.8 MB)
70.62      ━━━━━━━━━━━━━━━━━━━╸                     0.9/1.8 MB 11.0 kB/s eta 0:01:24
70.65 ERROR: Exception:
70.65 Traceback (most recent call last):
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
70.65     yield
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/urllib3/response.py", line 519, in read
70.65     data = self._fp.read(amt) if not fp_closed else b""
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 90, in read
70.65     data = self.__fp.read(amt)
70.65   File "/usr/lib/python3.10/http/client.py", line 466, in read
70.65     s = self.fp.read(amt)
70.65   File "/usr/lib/python3.10/socket.py", line 705, in readinto
70.65     return self._sock.recv_into(b)
70.65   File "/usr/lib/python3.10/ssl.py", line 1303, in recv_into
70.65     return self.read(nbytes, buffer)
70.65   File "/usr/lib/python3.10/ssl.py", line 1159, in read
70.65     return self._sslobj.read(len, buffer)
70.65 TimeoutError: The read operation timed out
70.65 
70.65 During handling of the above exception, another exception occurred:
70.65 
70.65 Traceback (most recent call last):
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
70.65     status = run_func(*args)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
70.65     return func(self, options, args)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 339, in run
70.65     requirement_set = resolver.resolve(
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
70.65     result = self._result = resolver.resolve(
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
70.65     state = resolution.resolve(requirements, max_rounds=max_rounds)
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
70.65     self._add_to_criteria(self.state.criteria, r, parent=None)
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
70.65     if not criterion.candidates:
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
70.65     return bool(self._sequence)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
70.65     return any(self)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
70.65     return (c for c in iterator if id(c) not in self._incompatible_ids)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 97, in _iter_built_with_inserted
70.65     candidate = func()
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
70.65     self._link_candidate_cache[link] = LinkCandidate(
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__
70.65     super().__init__(
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
70.65     self.dist = self._prepare()
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
70.65     dist = self._prepare_distribution()
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
70.65     return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
70.65     return self._prepare_linked_requirement(req, parallel_builds)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement
70.65     local_file = unpack_url(
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url
70.65     file = get_http_url(
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
70.65     from_path, content_type = download(link, temp_dir.path)
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/network/download.py", line 146, in __call__
70.65     for chunk in chunks:
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/cli/progress_bars.py", line 304, in _rich_progress_bar
70.65     for chunk in iterable:
70.65   File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 63, in response_chunks
70.65     for chunk in response.raw.stream(
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/urllib3/response.py", line 576, in stream
70.65     data = self.read(amt=amt, decode_content=decode_content)
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/urllib3/response.py", line 512, in read
70.65     with self._error_catcher():
70.65   File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
70.65     self.gen.throw(typ, value, traceback)
70.65   File "/usr/lib/python3/dist-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
70.65     raise ReadTimeoutError(self._pool, None, "Read timed out.")
70.65 pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Read timed out.
------

 2 warnings found (use docker --debug to expand):
 - UndefinedVar: Usage of undefined variable '$PYTHONPATH' (line 65)                                                                                                                                               
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 65)
Dockerfile:32
--------------------
  31 |     
  32 | >>> RUN pip3 install --upgrade pip -i $PIP_INDEX_URL \
  33 | >>>     && pip3 install -i $PIP_INDEX_URL ".[$DB_GPT_INSTALL_MODEL]" \
  34 | >>>     # install openai for proxyllm
  35 | >>>     && pip3 install -i $PIP_INDEX_URL ".[openai]"
  36 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install --upgrade pip -i $PIP_INDEX_URL     && pip3 install -i $PIP_INDEX_URL \".[$DB_GPT_INSTALL_MODEL]\"     && pip3 install -i $PIP_INDEX_URL \".[openai]\"" did not complete successfully: exit code: 2
Error: build base image failed

How can I fix it

Documentation Links

http://docs.dbgpt.cn/docs/installation/docker#docker-image-preparation

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@NgocKhanhC311 NgocKhanhC311 added documentation Improvements or additions to documentation Waiting for reply labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Waiting for reply
Projects
None yet
Development

No branches or pull requests

1 participant