The new setup tools release broke the creation of Docker Image #2949
rajibdas909
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the Docker file
`FROM python:3.9.1
RUN mkdir /spa
RUN mkdir /spa/spa_server
RUN mkdir /spa/spa_engine
COPY ./spa/spa_server /spa/spa_server
COPY ./spa/spa_server/pyproject.toml /spa/spa_server
COPY ./spa/spa_server/poetry.lock /spa/spa_server
RUN true
COPY ./spa/spa_engine /spa/spa_engine
WORKDIR /spa/spa_server
ENV PYTHONPATH=${PYTHONPATH}:${PWD}
ENV PYTHONUNBUFFERED=0
RUN pip3 install --upgrade setuptools
RUN pip3 install --upgrade pip
RUN pip3 install poetry
RUN poetry config virtualenvs.create false
RUN poetry install
EXPOSE 80
CMD poetry run uvicorn main:app --host 0.0.0.0 --port 80`
we fixed it for now by forcing to use
RUN pip3 install --upgrade setuptools==59.6.0
Any ideas
This is the error
File "/tmp/pip-build-env-gs31bvt0/overlay/lib/python3.9/site-packages/poetry/core/masonry/__init__.py", line 10, in <module> 2021-12-20T22:13:30.5797866Z from .builder import Builder 2021-12-20T22:13:30.5798471Z File "/tmp/pip-build-env-gs31bvt0/overlay/lib/python3.9/site-packages/poetry/core/masonry/builder.py", line 7, in <module> 2021-12-20T22:13:30.5798897Z from .builders.sdist import SdistBuilder 2021-12-20T22:13:30.5799528Z File "/tmp/pip-build-env-gs31bvt0/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/__init__.py", line 2, in <module> 2021-12-20T22:13:30.5799959Z from .wheel import WheelBuilder 2021-12-20T22:13:30.5800584Z File "/tmp/pip-build-env-gs31bvt0/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 23, in <module> 2021-12-20T22:13:30.5800994Z from packaging.tags import sys_tags 2021-12-20T22:13:30.5801623Z File "/tmp/pip-build-env-gs31bvt0/overlay/lib/python3.9/site-packages/poetry/core/_vendor/packaging/tags.py", line 7, in <module> 2021-12-20T22:13:30.5802091Z import distutils.util 2021-12-20T22:13:30.5802638Z File "/usr/local/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 92, in create_module 2021-12-20T22:13:30.5803201Z return importlib.import_module('setuptools._distutils') 2021-12-20T22:13:30.5803592Z File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module 2021-12-20T22:13:30.5804001Z return _bootstrap._gcd_import(name[level:], package, level) 2021-12-20T22:13:30.5804502Z ModuleNotFoundError: No module named 'setuptools' 2021-12-20T22:13:30.5804781Z 2021-12-20T22:13:30.5805099Z 2021-12-20T22:13:30.5805176Z 2021-12-20T22:13:30.5805565Z at /usr/local/lib/python3.9/site-packages/poetry/utils/env.py:1183 in _run 2021-12-20T22:13:30.6420061Z 1179│ output = subprocess.check_output( 2021-12-20T22:13:30.6420741Z 1180│ cmd, stderr=subprocess.STDOUT, **kwargs 2021-12-20T22:13:30.6421245Z 1181│ ) 2021-12-20T22:13:30.6421708Z 1182│ except CalledProcessError as e: 2021-12-20T22:13:30.6422412Z → 1183│ raise EnvCommandError(e, input=input_) 2021-12-20T22:13:30.6422825Z 1184│ 2021-12-20T22:13:30.6423211Z 1185│ return decode(output) 2021-12-20T22:13:30.6423587Z 1186│ 2021-12-20T22:13:30.6424029Z 1187│ def execute(self, bin, *args, **kwargs): 2021-12-20T22:13:30.6424238Z 2021-12-20T22:13:33.2483859Z The command '/bin/sh -c poetry install' returned a non-zero code: 1 2021-12-20T22:13:33.2567482Z ##[error]The command '/bin/sh -c poetry install' returned a non-zero c
Beta Was this translation helpful? Give feedback.
All reactions