Dockerfile | 실행자 실행 실패 [/bin/sh -c poem install --no-dev]: 종료 코드: 1

Dockerfile | 실행자 실행 실패 [/bin/sh -c poem install --no-dev]: 종료 코드: 1

저는 Docker를 처음 사용하기 때문에 오류의 원인을 설명하는 방법을 잘 모르겠습니다.

"Python의 종속성 관리 및 패키징 도구입니다. 이를 통해 프로젝트가 의존하는 라이브러리를 선언할 수 있으며 이를 관리(설치/업데이트)합니다. "

pip자격 증명을 제공하지 않았기 때문에 실패했습니다.url내 또는 파일 에 자격 증명을 어떻게 추가하나요 pytest.conf?


업데이트: 파일을 만들었습니다 pip.conf.

이제 docker build더 성공적인 설치가 이루어졌습니다. 그러나 여전히 실패했습니다.


pip.conf( PAT검토):

[global]
extra-index-url=https://<PAT>@pkgs.dev.azure.com/iotahoe/Halo/_packaging/private-sources/pypi/simple'

ls:

me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/ontology_tagger$ ls
Dockerfile  README.md  azure-pipeline-ontology_tagger.yaml  ontology_tagger  poetry.lock  pyproject.toml  pytest.ini  wss-unified-agent.config  wss_agent.sh

pytest.ini:

[pytest]
markers =
    integration: create endpoint and test returned confidence intervals
    unit: interrogate results of most recent trained model on select inputs
testpaths = tests/

자격 증명 문제

danielbellio@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/ontology_tagger$ docker build --no-cache -t my_app -f /home/danielbellio/.ssh/workers-python/workers/ontology_tagger/Dockerfile .
[+] Building 1880.1s (16/23)                                                                                                                                                                               
 => [internal] load build definition from Dockerfile                                                                                                                                                  0.0s
 => => transferring dockerfile: 38B                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/python:3.7-slim                                                                                                                                    8.8s
 => [auth] library/python:pull token for registry-1.docker.io                                                                                                                                         0.0s
 => CACHED [base 1/7] FROM docker.io/library/python:3.7-slim@sha256:798c7c77f4bba96b35de5fe9832b81084dcc4c1c52806d7976bf9233c7c3c4a6                                                                  0.0s
 => [internal] load build context                                                                                                                                                                     0.1s
 => => transferring context: 2.13kB                                                                                                                                                                   0.0s
 => CACHED https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py                                                                                                                0.0s
 => [base 2/7] RUN apt-get update -y     && apt-get -y --no-install-recommends install curl wget    && rm -rf /var/lib/apt/lists/*                                                                   14.7s
 => [base 3/7] WORKDIR /home/worker/python/ontology_tagger                                                                                                                                            0.1s 
 => [base 4/7] ADD https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py ./                                                                                                     0.1s 
 => [base 5/7] RUN python get-poetry.py && chmod +x /etc/poetry/bin/poetry                                                                                                                           59.4s 
 => [base 6/7] RUN --mount=type=cache,target=/root/.cache pip install twine keyring artifacts-keyring                                                                                                27.8s 
 => [base 7/7] RUN --mount=type=cache,target=/root/.cache apt update && apt install gcc -y                                                                                                           60.4s 
 => [build 1/6] COPY . .                                                                                                                                                                              0.1s 
 => [build 2/6] RUN poetry config experimental.new-installer false                                                                                                                                    3.0s 
 => ERROR [build 3/6] RUN poetry install --no-dev                                                                                                                                                  1705.5s 
------                                                                                                                                                                                                     
 > [build 3/6] RUN poetry install --no-dev:                                                                                                                                                                
#16 1.980 Creating virtualenv ontology-tagger in /home/worker/python/ontology_tagger/.venv                                                                                                                 
#16 7.523 Installing dependencies from lock file                                                                                                                                                           
#16 13.64                                                                                                                                                                                                  
#16 13.64 Package operations: 199 installs, 0 updates, 1 removal                                                                                                                                           
#16 13.64 
#16 13.64   - Removing wheel (0.37.0)
#16 15.02   - Installing six (1.16.0)
#16 16.84   - Installing typing-extensions (3.10.0.0)
#16 17.93   - Installing zipp (3.5.0)
#16 19.00   - Installing certifi (2021.5.30)
#16 20.10   - Installing charset-normalizer (2.0.4)
#16 21.21   - Installing greenlet (1.1.1)
#16 23.46   - Installing idna (3.2)
#16 24.81   - Installing importlib-metadata (4.6.3)
#16 26.52   - Installing ipython-genutils (0.2.0)
#16 28.13   - Installing markupsafe (2.0.1)
#16 29.85   - Installing promise (2.3)
#16 32.66   - Installing pyasn1 (0.4.8)
#16 35.22   - Installing pycparser (2.20)
#16 36.56   - Installing pytz (2021.1)
#16 38.94   - Installing rx (1.6.1)
#16 40.94   - Installing urllib3 (1.26.6)
#16 42.25   - Installing attrs (21.2.0)
#16 43.99   - Installing cachetools (4.2.2)
#16 45.63   - Installing cffi (1.14.6)
#16 47.33   - Installing graphql-core (2.3.2)
#16 49.38   - Installing grpcio (1.39.0)
#16 58.20   - Installing heapdict (1.0.1)
#16 60.10   - Installing humanfriendly (9.2)
#16 61.95   - Installing jmespath (0.10.0)
#16 63.62   - Installing locket (0.2.1)
#16 65.39   - Installing mako (1.1.4)
#16 67.76   - Installing numpy (1.21.1)
#16 79.65   - Installing oauthlib (3.1.1)
#16 81.43   - Installing protobuf (3.17.3)
#16 84.52   - Installing pyasn1-modules (0.2.8)
#16 86.70   - Installing pyparsing (2.4.7)
#16 88.44   - Installing pyrsistent (0.18.0)
#16 90.19   - Installing python-dateutil (2.8.2)
#16 92.69   - Installing python-editor (1.0.4)
#16 95.69   - Installing pytzdata (2020.1)
#16 98.10   - Installing pyyaml (5.3.1)
#16 101.9   - Installing requests (2.26.0)
#16 103.1   - Installing rsa (4.7.2)
#16 104.7   - Installing sqlalchemy (1.4.22)
#16 109.0   - Installing toolz (0.11.1)
#16 110.9   - Installing traitlets (5.0.5)
#16 113.0   - Installing tzlocal (1.5.1)
#16 116.0   - Installing zope.event (4.5.0)
#16 117.6   - Installing zope.interface (5.4.0)
#16 120.6   - Installing alembic (1.4.1)
#16 124.2   - Installing aniso8601 (7.0.0)
#16 125.9   - Installing backports.entry-points-selectable (1.1.0)
#16 127.9   - Installing botocore (1.21.19)
#16 135.5   - Installing click (7.1.2)
#16 137.3   - Installing cloudpickle (1.6.0)
#16 138.9   - Installing coloredlogs (14.0)
#16 140.5   - Installing contextlib2 (21.6.0)
#16 142.2   - Installing croniter (1.0.15)
#16 144.1   - Installing dask (2.30.0)
#16 147.4   - Installing dill (0.3.4)
#16 149.2   - Installing distlib (0.3.2)
#16 151.5   - Installing docstring-parser (0.7.1)
#16 760.1   - Installing filelock (3.0.12)
#16 762.5   - Installing fsspec (2021.7.0)
#16 766.0   - Installing funcsigs (1.0.2)
#16 768.2   - Installing future (0.18.2)
#16 778.4   - Installing gevent (21.8.0)
#16 810.7   - Installing google-auth (1.34.0)
#16 813.7   - Installing graphql-relay (2.0.1)
#16 815.7   - Installing grpcio-health-checking (1.39.0)
#16 817.7   - Installing itsdangerous (1.1.0)
#16 821.3   - Installing jinja2 (2.11.3)
#16 824.1   - Installing jsonschema (3.2.0)
#16 826.4   - Installing jupyter-core (4.7.1)
#16 828.7   - Installing marshmallow (3.13.0)
#16 831.3   - Installing msgpack (1.0.2)
#16 834.3   - Installing multidict (5.1.0)
#16 839.0   - Installing mypy-extensions (0.4.3)
#16 841.2   - Installing packaging (20.9)
#16 843.7   - Installing pandas (1.1.4)
#16 895.7   - Installing partd (1.2.0)
#16 898.7   - Installing pendulum (1.4.4)
#16 914.4   - Installing pillow (8.3.1)
#16 947.3   - Installing platformdirs (2.2.0)
#16 949.7   - Installing psutil (5.8.0)
#16 952.9   - Installing requests-oauthlib (1.3.0)
#16 955.5   - Installing smmap (4.0.0)
#16 958.1   - Installing sortedcontainers (2.4.0)
#16 960.0   - Installing tabulate (0.8.9)
#16 962.5   - Installing tblib (1.7.0)
#16 965.8   - Installing toposort (1.6)
#16 969.3   - Installing tornado (6.1)
#16 973.7   - Installing tqdm (4.49.0)
#16 976.6   - Installing watchdog (2.1.3)
#16 979.4   - Installing webencodings (0.5.1)
#16 981.2   - Installing websocket-client (0.59.0)
#16 983.9   - Installing werkzeug (1.0.1)
#16 986.8   - Installing zict (2.0.0)
#16 989.2   - Installing absl-py (0.13.0)
#16 992.2   - Installing async-timeout (3.0.1)
#16 994.5   - Installing bleach (4.0.0)
#16 996.7   - Installing bokeh (2.3.3)
#16 1020.0   - Installing cached-property (1.5.2)
#16 1023.2   - Installing cfgv (3.3.0)
#16 1025.6   - Installing chardet (4.0.0)
#16 1028.7   - Installing colorama (0.4.4)
#16 1030.6   - Installing configparser (5.0.2)
#16 1032.8   - Installing cycler (0.10.0)
#16 1035.1   - Installing dagster (0.9.22.post0)
#16 1041.2   - Installing defusedxml (0.7.1)
#16 1043.7   - Installing distributed (2.30.1)
#16 1049.5   - Installing distro (1.6.0)
#16 1052.8   - Installing docker (5.0.0)
#16 1055.5   - Installing dockerpty (0.4.1)
#16 1059.3   - Installing docopt (0.6.2)
#16 1064.4   - Installing entrypoints (0.3)
#16 1067.1   - Installing flask (1.1.4)
#16 1069.8   - Installing gevent-websocket (0.10.1)
#16 1072.8   - Installing gitdb (4.0.7)
#16 1075.4   - Installing google-auth-oauthlib (0.4.5)
#16 1078.1   - Installing graphene (2.1.9)
#16 1081.4   - Installing graphql-server-core (1.2.0)
#16 1085.9   - Installing identify (2.2.13)
#16 1089.3   - Installing joblib (1.0.1)
#16 1092.6   - Installing kiwisolver (1.3.1)
#16 1095.8   - Installing markdown (3.3.4)
#16 1099.0   - Installing marshmallow-enum (1.5.1)
#16 1101.4   - Installing mistune (0.8.4)
#16 1104.0   - Installing multiprocess (0.70.12.2)
#16 1107.9   - Installing nbformat (5.1.3)
#16 1111.8   - Installing nodeenv (1.6.0)
#16 1114.9   - Installing pandocfilters (1.4.3)
#16 1121.0   - Installing pathspec (0.8.1)
#16 1123.2   - Installing plumbum (1.7.0)
#16 1125.3   - Installing pox (0.3.0)
#16 1127.4   - Installing ppft (1.6.6.4)
#16 1129.2   - Installing prometheus-client (0.11.0)
#16 1131.2   - Installing pydantic (1.8.2)
#16 1136.3   - Installing pygments (2.9.0)
#16 1139.9   - Installing pymongo (3.12.0)
#16 1143.5   - Installing python-dotenv (0.19.0)
#16 1145.5   - Installing pyyaml-include (1.2.post2)
#16 1147.6   - Installing regex (2020.11.13)
#16 1151.2   - Installing s3transfer (0.5.0)
#16 1153.2   - Installing stringcase (1.2.0)
#16 1157.5   - Installing tensorboard-data-server (0.6.1)
#16 1161.9   - Installing tensorboard-plugin-wit (1.8.0)
#16 1165.3   - Installing testpath (0.5.0)
#16 1167.8   - Installing texttable (1.6.4)
#16 1170.2   - Installing toml (0.10.2)
#16 1172.8   - Installing torch (1.7.1)
#16 1469.6   - Installing typing-inspect (0.7.1)
#16 1472.3   - Installing virtualenv (20.7.2)
#16 1478.0   - Installing yarl (1.6.3)
#16 1481.9   - Installing aiohttp (3.7.4.post0)
#16 1488.6   - Installing autologging (1.3.2)
#16 1491.0   - Installing boto3 (1.18.19)
#16 1495.9   - Installing copier (5.1.0)
#16 1498.8   - Installing cryptography (3.4.7)
#16 1502.4   - Installing dagster-dask (0.9.22.post0)
#16 1506.1   - Installing dagster-graphql (0.9.22.post0)
#16 1509.5   - Installing databricks-cli (0.15.0)
#16 1514.2   - Installing dataclasses-json (0.5.4)
#16 1517.4   - Installing docker-compose (1.29.2)
#16 1521.0   - Installing flask-cors (3.0.10)
#16 1523.4   - Installing flask-graphql (2.0.1)
#16 1527.9   - Installing flask-sockets (0.2.1)
#16 1530.5   - Installing gitpython (3.1.20)
#16 1533.5   - Installing google-pasta (0.2.0)
#16 1536.4   - Installing graphql-ws (0.3.1)
#16 1539.7   - Installing gunicorn (20.1.0)
#16 1543.7   - Installing huggingface-hub (0.0.2)
#16 1546.6   - Installing matplotlib (3.4.2)
#16 1557.1   - Installing minio (6.0.2)
#16 1560.1   - Installing mongoengine (0.20.0)
#16 1562.9   - Installing motor (2.5.0)
#16 1565.5   - Installing nbconvert (5.6.1)
#16 1569.7   - Installing pathos (0.2.8)
#16 1572.6   - Installing pre-commit (2.14.0)
#16 1576.3   - Installing prometheus-flask-exporter (0.18.2)
#16 1581.1   - Installing protobuf3-to-dict (0.1.5)
#16 1586.2   - Installing psycopg2-binary (2.9.1)
#16 1590.0   - Installing pyarrow (2.0.0)
#16 1603.1   - Installing querystring-parser (1.2.4)
#16 1607.8   - Installing sacremoses (0.0.45)
#16 1615.6   - Installing scipy (1.7.1)
#16 1634.3   - Installing smdebug-rulesconfig (1.0.1)
#16 1637.7   - Installing sqlparse (0.4.1)
#16 1640.8   - Installing tensorboard (2.6.0)
#16 1653.9   - Installing threadpoolctl (2.2.0)
#16 1657.0   - Installing tokenizers (0.10.3)
#16 1664.0   - Installing torchmetrics (0.3.2)
#16 1668.0   - Installing xxhash (2.0.2)
#16 1671.7   - Installing dagit (0.9.22.post0)
#16 1676.9   - Installing dagster-aws (0.9.22.post0)
#16 1680.8   - Installing dagster-pandas (0.9.22.post0)
#16 1685.5   - Installing dagster-postgres (0.9.22.post0)
#16 1689.3   - Installing datasets (1.4.1)
#16 1692.6   - Installing mlflow (1.15.0)
#16 1701.5   - Installing pwmf (0.1.3.1.dev1)
#16 1704.6 
#16 1704.6   EnvCommandError
#16 1704.6 
#16 1704.6   Command ['/home/worker/python/ontology_tagger/.venv/bin/pip', 'install', '--no-deps', '--index-url', 'https://pkgs.dev.azure.com/iotahoe/Halo/_packaging/private-sources/pypi/simple', 'pwmf==0.1.3.1.dev1'] errored with the following return code 2, and output: 
#16 1704.6   Looking in indexes: https://pkgs.dev.azure.com/iotahoe/Halo/_packaging/private-sources/pypi/simple
#16 1704.6   User for pkgs.dev.azure.com: ERROR: Exception:
#16 1704.6   Traceback (most recent call last):
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
#16 1704.6       status = self.run(options, args)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
#16 1704.6       return func(self, options, args)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 325, in run
#16 1704.6       reqs, check_supported_wheels=not options.target_dir
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
#16 1704.6       discovered_reqs.extend(self._resolve_one(requirement_set, req))
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
#16 1704.6       abstract_dist = self._get_abstract_dist_for(req_to_install)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for
#16 1704.6       self._populate_link(req)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link
#16 1704.6       req.link = self._find_requirement_link(req)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link
#16 1704.6       best_candidate = self.finder.find_requirement(req, upgrade)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 899, in find_requirement
#16 1704.6       req.name, specifier=req.specifier, hashes=hashes,
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 881, in find_best_candidate
#16 1704.6       candidates = self.find_all_candidates(project_name)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 826, in find_all_candidates
#16 1704.6       project_url, link_evaluator=link_evaluator,
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 790, in process_project_url
#16 1704.6       html_page = self._link_collector.fetch_page(project_url)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/collector.py", line 643, in fetch_page
#16 1704.6       return _get_html_page(location, session=self.session)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/collector.py", line 455, in _get_html_page
#16 1704.6       resp = _get_html_response(url, session=session)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/index/collector.py", line 169, in _get_html_response
#16 1704.6       "Cache-Control": "max-age=0",
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 543, in get
#16 1704.6       return self.request('GET', url, **kwargs)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/network/session.py", line 421, in request
#16 1704.6       return super(PipSession, self).request(method, url, *args, **kwargs)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 530, in request
#16 1704.6       resp = self.send(prep, **send_kwargs)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 650, in send
#16 1704.6       r = dispatch_hook('response', hooks, r, **kwargs)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_vendor/requests/hooks.py", line 31, in dispatch_hook
#16 1704.6       _hook_data = hook(hook_data, **kwargs)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/network/auth.py", line 256, in handle_401
#16 1704.6       username, password, save = self._prompt_for_password(parsed.netloc)
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/network/auth.py", line 226, in _prompt_for_password
#16 1704.6       username = ask_input("User for {}: ".format(netloc))
#16 1704.6     File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 259, in ask_input
#16 1704.6       return input(message)
#16 1704.6   EOFError: EOF when reading a line
#16 1704.6   WARNING: You are using pip version 20.2.2; however, version 21.2.4 is available.
#16 1704.6   You should consider upgrading via the '/home/worker/python/ontology_tagger/.venv/bin/python -m pip install --upgrade pip' command.
#16 1704.6   
#16 1704.6 
#16 1704.6   at /etc/poetry/lib/poetry/utils/env.py:1074 in _run
#16 1704.8       1070│                 output = subprocess.check_output(
#16 1704.8       1071│                     cmd, stderr=subprocess.STDOUT, **kwargs
#16 1704.8       1072│                 )
#16 1704.8       1073│         except CalledProcessError as e:
#16 1704.8     → 1074│             raise EnvCommandError(e, input=input_)
#16 1704.8       1075│ 
#16 1704.8       1076│         return decode(output)
#16 1704.8       1077│ 
#16 1704.9       1078│     def execute(self, bin, *args, **kwargs):
------
executor failed running [/bin/sh -c poetry install --no-dev]: exit code: 1

Dockerfile(5~7행):

#https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md
#require set DOCKER_BUILDKIT=1

FROM python:3.7-slim as base
RUN apt-get update -y \
    && apt-get -y --no-install-recommends install curl wget\
    && rm -rf /var/lib/apt/lists/* 
ENV ROOT /home/worker/python/ontology_tagger
WORKDIR $ROOT

ARG ATLASSIAN_TOKEN
ARG POETRY_HTTP_BASIC_AZURE_PASSWORD
ARG ACCESS_KEY
ENV AWS_ACCESS_KEY_ID=$ACCESS_KEY
ARG SECRET_KEY
ENV AWS_SECRET_ACCESS_KEY=$SECRET_KEY
ARG REPO
ENV REPO_URL=$REPO
# Copy/symlink pypic file to the docker context before running docker build
ENV PYPIRC_PATH=$ROOT/.pypirc

ENV \
    PYTHONFAULTHANDLER=1 \
    POETRY_VERSION=1.1.4 \
    POETRY_HOME=/etc/poetry \
    XDG_CACHE_HOME=/home/worker/.cache \
    POETRY_VIRTUALENVS_IN_PROJECT=true \
    MPLCONFIGDIR=/home/worker/matplotlib \
    PATH=/home/worker/python/ontology_tagger/.venv/bin:/usr/local/bin:/etc/poetry/bin:$PATH

# System deps:
ADD https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py ./
RUN python get-poetry.py && chmod +x /etc/poetry/bin/poetry
# Copy only requirements to cache them in docker layer
RUN --mount=type=cache,target=/root/.cache pip install twine keyring artifacts-keyring
RUN --mount=type=cache,target=/root/.cache apt update && apt install gcc -y

FROM base as ws
ARG WS_APIKEY
ARG WS_PROJECTVERSION=
ARG WS_PROJECTNAME=workers-python-ontology_tagger
ARG WS_PRODUCTNAME=HALO
COPY --chown=worker:worker . .
RUN --mount=type=cache,uid=1000,target=/home/worker/.cache poetry install --no-dev
COPY --from=openjdk:15-slim-buster /usr/local/openjdk-15 /usr/local/openjdk-15
ENV JAVA_HOME /usr/local/openjdk-15
ENV PATH $JAVA_HOME/bin:$PATH
RUN --mount=type=cache,uid=1000,target=/home/worker/.cache ./wss_agent.sh

FROM base as test
COPY . .
RUN poetry config experimental.new-installer false
RUN poetry install
RUN cd ontology_tagger && poetry run invoke deploy
# RUN sphinx-build -b confluence -Q docs/source docs/build -E -a -D confluence_server_pass=$ATLASSIAN_TOKEN

FROM base as package
COPY . .
RUN poetry build
RUN python -m pip install --upgrade pip && \
pip install twine keyring artifacts-keyring && \
twine upload -r $REPO_URL --config-file $PYPIRC_PATH dist/* --skip-existing

FROM base as build
COPY . .
RUN poetry config experimental.new-installer false
RUN poetry install --no-dev
RUN pip3 --no-cache-dir install --upgrade awscli
RUN aws s3 cp s3://iotahoe-datascience/python_workers/dbpedia/output/ontologytagger-2021-05-23-20-49-40-099/output/model.tar.gz $ROOT/ontology_tagger
RUN mkdir $ROOT/ontology_tagger/bert-base-cased && cd $ROOT/ontology_tagger/bert-base-cased && \
wget https://huggingface.co/bert-base-cased/resolve/main/config.json && \
wget https://huggingface.co/bert-base-cased/resolve/main/tokenizer.json && \
wget https://huggingface.co/bert-base-cased/resolve/main/tokenizer_config.json 

FROM python:3.7-slim as production
ENV  ROOT=/home/worker/python/ontology_tagger \
     VIRTUAL_ENV=/home/worker/python/ontology_tagger/.venv\
     PATH=/home/worker/python/ontology_tagger/.venv/bin:/home/worker/python/ontology_tagger:$PATH
COPY --from=build /home/worker/python/ontology_tagger/pyproject.toml /home/worker/python/
COPY --from=build /home/worker/python/ontology_tagger/.venv /home/worker/python/ontology_tagger/.venv
COPY --from=build /home/worker/python/ontology_tagger/ontology_tagger /home/worker/python/ontology_tagger
WORKDIR $ROOT
ENV PYTHONPATH=$ROOT:/home/worker/python/
# args in format mongodb://user:pass@mongodb:27017/ops?authSource=admin,ops,jobs,pipelineId-ce6b9dad-0fa1-42f7-a04d-b54d1468dc7f:ontology_tagger_worker
ENTRYPOINT [ "primary_worker", "--mongo" ]

답변1

시스템 시계를 조정하여 발견된 첫 번째 버그가 수정되었습니다.

두 번째 오류는 pip가 비밀번호를 요구하기 때문에 발생합니다.

File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/network/**auth.py", line 226, in _prompt_for_password**


username = ask_input("User for {}: ".format(netloc))
File "/home/worker/python/ontology_tagger/.venv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", **line 259, in ask_input**

따라서 이는 URL 또는 pip.conf에 이러한 자격 증명을 추가해야 함을 의미합니다.

#16 957.2   Command ['/home/worker/python/ontology_tagger/.venv/bin/pip', 'install', '--no-deps', '--index-url', 'https://pkgs.dev.azure.com/iotahoe/Halo/_packaging/private-sources/pypi/simple', 'pwmf==0.1.3.1.dev1'] errored with the following return code 2, and output: 

관련 정보