Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7074

pip install failing in azurelinux based docker image

$
0
0

We are using mcr.microsoft.com/azurelinux/base/python:3.12.3-4-azl3.0.20241101-amd64 as our base image to build python based application . but when we are performing docker build from a ubuntu18 or 22 based host machine, with the pip command inside the dockerfile, we are getting below error. But when we execute the build from rhel8 host machine its working.

   Downloading pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB) Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.5->fastapi-cli[standard]>=0.0.5; extra == "standard"->fastapi[standard]==0.115.5->-r requirements.txt (line 1))   Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB) Downloading fastapi-0.115.5-py3-none-any.whl (94 kB) Downloading httpx-0.27.2-py3-none-any.whl (76 kB) Downloading langchain-0.3.7-py3-none-any.whl (1.0 MB) [91mERROR: Exception: Traceback (most recent call last):   File "/usr/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper     status = _inner_run()              ^^^^^^^^^^^^   File "/usr/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run     return self.run(options, args)            ^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper     return func(self, options, args)            ^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 379, in run     requirement_set = resolver.resolve(                       ^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 179, in resolve     self.factory.preparer.prepare_linked_requirements_more(reqs)   File "/usr/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 554, in prepare_linked_requirements_more     self._complete_partial_requirements(   File "/usr/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 469, in _complete_partial_requirements     for link, (filepath, _) in batch_download:   File "/usr/lib/python3.12/site-packages/pip/_internal/network/download.py", line 184, in __call__     for chunk in chunks:   File "/usr/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py", line 54, in _rich_progress_bar     with progress:   File "/usr/lib/python3.12/site-packages/pip/_vendor/rich/progress.py", line 1168, in __enter__     self.start()   File "/usr/lib/python3.12/site-packages/pip/_vendor/rich/progress.py", line 1159, in start     self.live.start(refresh=True)   File "/usr/lib/python3.12/site-packages/pip/_vendor/rich/live.py", line 132, in start     self._refresh_thread.start()   File "/usr/lib/python3.12/threading.py", line 992, in start     _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread [0mThe command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 2

requirement.txt

fastapi[standard]==0.115.5httpx==0.27.2langchain==0.3.7langchain-core==0.3.19langchain_community==0.3.2langchain-openai==0.2.9langchain-text-splitters==0.3.2logger==1.4openai==1.54.5pandas==2.2.3pydantic==2.9.2pydantic_core==2.23.4pytest==8.3.3pytest-cov==6.0.0pytest-integration-mark==0.2.0pytest-mock==3.14.0python-dotenv==1.0.1requests==2.32.3rank-bm25==0.2.2six==1.16.0

Dockerfile as below

mcr.microsoft.com/azurelinux/base/python:3.12.3-4-azl3.0.20241101-amd64WORKDIR /appCOPY requirements.txt /appCOPY ./pip.conf ~/.pip/RUN pip3 install --no-cache-dir -r requirements.txt...........................

Viewing all articles
Browse latest Browse all 7074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>