Hi Team,
I am trying to buld a docker image out of a docker file and its working good in my windows machine. but how ever same steps are failing in CI/CD Linux env. Please help me to understand the issue.
Docker file:
FROM python:3.11.4
WORKDIR /app
COPY . /app/
RUN chmod +x deployment/script.sh
RUN pip3 install --no-cache-dir -r requirements.txt
CMD [ “deployment/script.sh” ]
Requirements.txt
aiobotocore==2.5.4
aiohttp==3.8.5
aioitertools==0.11.0
aiosignal==1.3.1
async-generator==1.10
async-timeout==4.0.2
botocore==1.31.17
certipy==0.1.3
cmaes==0.10.0
colorlog==6.7.0
croniter==1.4.1
databricks-cli==0.17.7
docker==6.1.3
docopt==0.6.2
Flask==2.3.2
frozenlist==1.4.0
gunicorn==20.1.0
ipython-genutils==0.2.0
itsdangerous==2.1.2
jmespath==1.0.1
jsonpointer==2.0
jupyter_scheduler==2.0.0
llvmlite==0.40.1
Markdown==3.4.4
mlflow==2.5.0
multidict==6.0.4
munkres==1.1.4
optuna==3.3.0
pamela==1.0.0
pipreqs==0.4.13
protobuf==4.23.3
pyarrow==12.0.1
pycurl==7.45.1
pydantic==1.10.12
querystring-parser==1.2.4
shap==0.42.1
slicer==0.0.7
SQLAlchemy==1.4.49
sqlparse==0.4.4
tabulate==0.9.0
urllib3==1.26.16
webencodings==0.5.1
Werkzeug==2.3.6
wrapt==1.15.0
yarg==0.1.9
yarl==1.9.2
zstandard==0.19.0
ipython==8.14.0
ipywidgets==8.1.0
lightgbm==4.1.0
matplotlib==3.7.2
numpy==1.24.4
optuna==3.3.0
pandas==1.5.2
PyYAML==6.0.1
scikit_learn==1.3.0
openpyxl==3.1.2
Error in CI/CD
Step 5/6 : RUN pip3 install --no-cache-dir -r requirements.txt
10:10:49 —> Running in c14edff9bb4e
10:10:50 Collecting aiobotocore==2.5.4 (from -r requirements.txt (line 1))
10:10:51 Downloading aiobotocore-2.5.4-py3-none-any.whl (73 kB)
10:10:51 ERROR: Exception:
10:10:51 Traceback (most recent call last):
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py”, line 169, in exc_logging_wrapper
10:10:51 status = run_func(*args)
10:10:51 ^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/cli/req_command.py”, line 248, in wrapper
10:10:51 return func(self, options, args)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/commands/install.py”, line 377, in run
10:10:51 requirement_set = resolver.resolve(
10:10:51 ^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 92, in resolve
10:10:51 result = self._result = resolver.resolve(
10:10:51 ^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 546, in resolve
10:10:51 state = resolution.resolve(requirements, max_rounds=max_rounds)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 397, in resolve
10:10:51 self._add_to_criteria(self.state.criteria, r, parent=None)
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 173, in _add_to_criteria
10:10:51 if not criterion.candidates:
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/resolvelib/structs.py”, line 156, in bool
10:10:51 return bool(self._sequence)
10:10:51 ^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 155, in bool
10:10:51 return any(self)
10:10:51 ^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 143, in
10:10:51 return (c for c in iterator if id(c) not in self._incompatible_ids)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 47, in _iter_built
10:10:51 candidate = func()
10:10:51 ^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py”, line 206, in _make_candidate_from_link
10:10:51 self._link_candidate_cache[link] = LinkCandidate(
10:10:51 ^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 293, in init
10:10:51 super().init(
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 156, in init
10:10:51 self.dist = self._prepare()
10:10:51 ^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 225, in _prepare
10:10:51 dist = self._prepare_distribution()
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 304, in _prepare_distribution
10:10:51 return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py”, line 516, in prepare_linked_requirement
10:10:51 return self._prepare_linked_requirement(req, parallel_builds)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py”, line 587, in _prepare_linked_requirement
10:10:51 local_file = unpack_url(
10:10:51 ^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py”, line 166, in unpack_url
10:10:51 file = get_http_url(
10:10:51 ^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py”, line 107, in get_http_url
10:10:51 from_path, content_type = download(link, temp_dir.path)
10:10:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/network/download.py”, line 147, in call
10:10:51 for chunk in chunks:
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py”, line 52, in _rich_progress_bar
10:10:51 with progress:
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/rich/progress.py”, line 1169, in enter
10:10:51 self.start()
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/rich/progress.py”, line 1160, in start
10:10:51 self.live.start(refresh=True)
10:10:51 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/rich/live.py”, line 132, in start
10:10:51 self._refresh_thread.start()
10:10:51 File “/usr/local/lib/python3.11/threading.py”, line 957, in start
10:10:51 _start_new_thread(self._bootstrap, ())
10:10:51 RuntimeError: can’t start new thread
10:10:51
10:10:51 [notice] A new release of pip is available: 23.1.2 → 23.3
10:10:51 [notice] To update, run: pip install --upgrade pip
10:10:51 The command ‘/bin/sh -c pip3 install --no-cache-dir -r requirements.txt’ returned a non-zero code: 2