Clouditera / SecGPT

SecGPT网络安全大模型
Apache License 2.0
1.77k stars 237 forks source link

mini 构建docker镜像报错 #61

Closed byXewl closed 1 month ago

byXewl commented 1 month ago

$ docker build -t secgpt-mini .

0 building with "desktop-linux" instance using docker driver

1 [internal] load build definition from Dockerfile

1 transferring dockerfile: 272B done

1 DONE 0.0s

2 [internal] load metadata for docker.io/library/python:slim

2 DONE 6.0s

3 [internal] load .dockerignore

3 transferring context: 2B done

3 DONE 0.0s

4 [1/4] FROM docker.io/library/python:slim@sha256:59c7332a4a24373861c4a5f0eec2c92b87e3efeb8ddef011744ef9a751b1d11c

4 DONE 0.0s

5 [internal] load build context

5 transferring context: 1.91kB done

5 DONE 0.0s

6 [2/4] WORKDIR /secgpt-mini

6 CACHED

7 [3/4] COPY . /secgpt-mini

7 DONE 0.1s

8 [4/4] RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt

8 1.347 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/

8 12.94 Collecting datasets==2.12.0 (from -r requirements.txt (line 1))

8 13.35 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fb/1c/85a22f3fa02dce5403094c5dbce494d62343b5a7e518bdf6e4200dda7337/datasets-2.12.0-py3-none-any.whl (474 kB)

8 14.71 Collecting gradio==3.37.0 (from -r requirements.txt (line 2))

8 15.12 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/41/b6/eb030aa054e51be202c8aee0a6b5fefb35527499c914019f1f2741537029/gradio-3.37.0-py3-none-any.whl (19.8 MB)

8 17.70 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.8/19.8 MB 7.8 MB/s eta 0:00:00

8 18.51 Collecting matplotlib==3.7.2 (from -r requirements.txt (line 3))

8 18.91 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/59/b859fa2539b4121b016ea85758188203522fc12b0711de8b247cfec3cdac/matplotlib-3.7.2.tar.gz (38.1 MB)

8 23.50 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.1/38.1 MB 8.5 MB/s eta 0:00:00

8 25.16 Installing build dependencies: started

8 40.71 Installing build dependencies: finished with status 'done'

8 40.71 Getting requirements to build wheel: started

8 41.19 Getting requirements to build wheel: finished with status 'done'

8 41.19 Preparing metadata (pyproject.toml): started

8 41.51 Preparing metadata (pyproject.toml): finished with status 'done'

8 42.04 Collecting numpy==1.24.4 (from -r requirements.txt (line 4))

8 42.44 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a4/9b/027bec52c633f6556dba6b722d9a0befb40498b9ceddd29cbe67a45a127c/numpy-1.24.4.tar.gz (10.9 MB)

8 43.96 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.9/10.9 MB 7.1 MB/s eta 0:00:00

8 44.81 Installing build dependencies: started

8 51.34 Installing build dependencies: finished with status 'done'

8 51.34 Getting requirements to build wheel: started

8 51.46 Getting requirements to build wheel: finished with status 'error'

8 51.47 error: subprocess-exited-with-error

8 51.47

8 51.47 × Getting requirements to build wheel did not run successfully.

8 51.47 │ exit code: 1

8 51.47 ╰─> [33 lines of output]

8 51.47 Traceback (most recent call last):

8 51.47 File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in

8 51.47 main()

8 51.47 File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

8 51.47 json_out['return_val'] = hook(**hook_input['kwargs'])

8 51.47 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

8 51.47 File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel

8 51.47 backend = _build_backend()

8 51.47 ^^^^^^^^^^^^^^^^

8 51.47 File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend

8 51.47 obj = import_module(mod_path)

8 51.47 ^^^^^^^^^^^^^^^^^^^^^^^

8 51.47 File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module

8 51.47 return _bootstrap._gcd_import(name[level:], package, level)

8 51.47 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

8 51.47 File "", line 1387, in _gcd_import

8 51.47 File "", line 1360, in _find_and_load

8 51.47 File "", line 1310, in _find_and_load_unlocked

8 51.47 File "", line 488, in _call_with_frames_removed

8 51.47 File "", line 1387, in _gcd_import

8 51.47 File "", line 1360, in _find_and_load

8 51.47 File "", line 1331, in _find_and_load_unlocked

8 51.47 File "", line 935, in _load_unlocked

8 51.47 File "", line 995, in exec_module

8 51.47 File "", line 488, in _call_with_frames_removed

8 51.47 File "/tmp/pip-build-env-1_htxv5n/overlay/lib/python3.12/site-packages/setuptools/init.py", line 16, in

8 51.47 import setuptools.version

8 51.47 File "/tmp/pip-build-env-1_htxv5n/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in

8 51.47 import pkg_resources

8 51.47 File "/tmp/pip-build-env-1_htxv5n/overlay/lib/python3.12/site-packages/pkg_resources/init.py", line 2172, in

8 51.47 register_finder(pkgutil.ImpImporter, find_on_path)

8 51.47 ^^^^^^^^^^^^^^^^^^^

8 51.47 AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

8 51.47 [end of output]

8 51.47

8 51.47 note: This error originates from a subprocess, and is likely not a problem with pip.

8 53.24 error: subprocess-exited-with-error

8 53.24

8 53.24 × Getting requirements to build wheel did not run successfully.

8 53.24 │ exit code: 1

8 53.24 ╰─> See above for output.

8 53.24

8 53.24 note: This error originates from a subprocess, and is likely not a problem with pip.

8 ERROR: process "/bin/sh -c pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt" did not complete successfully: exit code: 1


[4/4] RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt: 51.47 [end of output] 51.47 51.47 note: This error originates from a subprocess, and is likely not a problem with pip. 53.24 error: subprocess-exited-with-error 53.24 53.24 × Getting requirements to build wheel did not run successfully. 53.24 │ exit code: 1 53.24 ╰─> See above for output. 53.24 53.24 note: This error originates from a subprocess, and is likely not a problem with pip.

Dockerfile:7

5 | COPY . /secgpt-mini 6 | 7 | >>> RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt 8 | 9 | EXPOSE 7860

ERROR: failed to solve: process "/bin/sh -c pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/wqhrbrrcynoj8jlzqc8in67vk

怎么回事哦