docker-prompt-generator icon indicating copy to clipboard operation
docker-prompt-generator copied to clipboard

部署报错

Open dev-coco opened this issue 1 year ago • 5 comments

[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile.base 0.0s => => transferring dockerfile: 696B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 11: FROM requires either one or three arguments

看了一下其它人的 Issues 说是 docker版本的问题,我尝试过从官网下载最新的版本,但是也无法正常部署,不知道哪个版本可以正常编译?

Cloud integration: v1.0.31 Version: 20.10.24 API version: 1.41 Go version: go1.19.7 Git commit: 297e128 Built: Tue Apr 4 18:21:21 2023 OS/Arch: darwin/arm64 Context: default Experimental: true

dev-coco avatar Apr 12 '23 18:04 dev-coco

试一下这个 https://github.com/soulteary/docker-prompt-generator/issues/11#issuecomment-1506912985

cnhuz avatar Apr 13 '23 13:04 cnhuz

试一下这个 #11 (comment)

出现了这个错误

  => ERROR [5/5] RUN python /get-models.py &&     rm -rf /get-models.py     1.9s
------
 > [5/5] RUN python /get-models.py &&     rm -rf /get-models.py:
#0 1.545 Traceback (most recent call last):
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/sklearn/__check_build/__init__.py", line 44, in <module>
#0 1.545     from ._check_build import check_build  # noqa
#0 1.545 ImportError: /usr/local/lib/python3.8/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block
#0 1.545 
#0 1.545 During handling of the above exception, another exception occurred:
#0 1.545 
#0 1.545 Traceback (most recent call last):
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/utils/import_utils.py", line 1146, in _get_module
#0 1.545     return importlib.import_module("." + module_name, self.__name__)
#0 1.545   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
#0 1.545     return _bootstrap._gcd_import(name[level:], package, level)
#0 1.545   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
#0 1.545   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
#0 1.545   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
#0 1.545   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
#0 1.545   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
#0 1.545   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/__init__.py", line 60, in <module>
#0 1.545     from .document_question_answering import DocumentQuestionAnsweringPipeline
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/document_question_answering.py", line 29, in <module>
#0 1.545     from .question_answering import select_starts_ends
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/question_answering.py", line 8, in <module>
#0 1.545     from ..data import SquadExample, SquadFeatures, squad_convert_examples_to_features
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/data/__init__.py", line 26, in <module>
#0 1.545     from .metrics import glue_compute_metrics, xnli_compute_metrics
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/data/metrics/__init__.py", line 18, in <module>
#0 1.545     if is_sklearn_available():
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/utils/import_utils.py", line 565, in is_sklearn_available
#0 1.545     return is_scipy_available() and importlib.util.find_spec("sklearn.metrics")
#0 1.545   File "/usr/lib/python3.8/importlib/util.py", line 94, in find_spec
#0 1.545     parent = __import__(parent_name, fromlist=['__path__'])
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/sklearn/__init__.py", line 81, in <module>
#0 1.545     from . import __check_build  # noqa: F401
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/sklearn/__check_build/__init__.py", line 46, in <module>
#0 1.545     raise_build_error(e)
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/sklearn/__check_build/__init__.py", line 31, in raise_build_error
#0 1.545     raise ImportError("""%s
#0 1.545 ImportError: /usr/local/lib/python3.8/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block
#0 1.545 ___________________________________________________________________________
#0 1.545 Contents of /usr/local/lib/python3.8/dist-packages/sklearn/__check_build:
#0 1.545 _check_build.cpython-38-aarch64-linux-gnu.so__pycache__               __init__.py
#0 1.545 setup.py
#0 1.545 ___________________________________________________________________________
#0 1.545 It seems that scikit-learn has not been built correctly.
#0 1.545 
#0 1.545 If you have installed scikit-learn from source, please do not forget
#0 1.545 to build the package before using it: run `python setup.py install` or
#0 1.545 `make` in the source directory.
#0 1.545 
#0 1.545 If you have used an installer, please check that it is suited for your
#0 1.545 Python version, your operating system and your platform.
#0 1.545 
#0 1.545 The above exception was the direct cause of the following exception:
#0 1.545 
#0 1.545 Traceback (most recent call last):
#0 1.545   File "/get-models.py", line 1, in <module>
#0 1.545     from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
#0 1.545   File "<frozen importlib._bootstrap>", line 1039, in _handle_fromlist
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/utils/import_utils.py", line 1136, in __getattr__
#0 1.545     module = self._get_module(self._class_to_module[name])
#0 1.545   File "/usr/local/lib/python3.8/dist-packages/transformers/utils/import_utils.py", line 1148, in _get_module
#0 1.545     raise RuntimeError(
#0 1.545 RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
#0 1.545 /usr/local/lib/python3.8/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block
#0 1.545 ___________________________________________________________________________
#0 1.545 Contents of /usr/local/lib/python3.8/dist-packages/sklearn/__check_build:
#0 1.545 _check_build.cpython-38-aarch64-linux-gnu.so__pycache__               __init__.py
#0 1.545 setup.py
#0 1.545 ___________________________________________________________________________
#0 1.545 It seems that scikit-learn has not been built correctly.
#0 1.545 
#0 1.545 If you have installed scikit-learn from source, please do not forget
#0 1.545 to build the package before using it: run `python setup.py install` or
#0 1.545 `make` in the source directory.
#0 1.545 
#0 1.545 If you have used an installer, please check that it is suited for your
#0 1.545 Python version, your operating system and your platform.
------
ERROR: failed to solve: executor failed running [/bin/sh -c python /get-models.py &&     rm -rf /get-models.py]: exit code: 1

dev-coco avatar Apr 13 '23 21:04 dev-coco

cannot allocate memory in static TLS block 我当时改完这个文件也报了另外一个错,没注意那个错跟你这个一样不,升级了dockerversion 20.10.24, build 297e128,就构建成功了

cnhuz avatar Apr 14 '23 03:04 cnhuz

cannot allocate memory in static TLS block 我当时改完这个文件也报了另外一个错,没注意那个错跟你这个一样不,升级了dockerversion 20.10.24, build 297e128,就构建成功了

还是不行,我把docker卸载重新安装了20.10.24版本,还是依然出现上面的错误,不知道和Apple silicon M1有没有关系

dev-coco avatar Apr 14 '23 12:04 dev-coco

我也是 mac m1 max 同样的错误

mouhao avatar Apr 19 '23 07:04 mouhao