Open anjalirai-intel opened 1 month ago
Same problem. Install requests version 2.31.0 until it will be fixed
pip3 install requests==2.31.0 docker jinja2 tomli tomli-w pyyaml
We can no longer install packages via pip
Does it work if you install these packages from apt
?
Does it work if you install these packages from
apt
?
All the packages are installed via apt
Root cause of the issue:
GSC uses Docker SDK for python
for building the docker images which internally makes use of requests
and urllib3
for connections with docker service.
Ubuntu 24.04 installs python3-urllib3=2.0.7
and python3-requests=2.31.0
versions which are not compatible as described here. This compatibility issue is fixed in Docker SDK for python
version 6.1.0 with PR 3116 but Ununtu 24.04 installs Docker SDK for python
version 5.0.3 which doesn't have the fix in it, hence we see the issue.
There are three approaches to fix this issue, @dimakuv @mkow, Please suggest which one suits better:
Force docker sdk for python
installation with pip using command: pip3 install docker --break-system-packages
which installs the python3-docker
version >=6.1.0
.
Build/install manually from source code:
git clone --branch 7.0.0 https://github.com/docker/docker-py.git
cd docker-py
python3 setup.py build
sudo python3 setup.py install
Test:
$ python3
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker;
>>> client = docker.from_env()
Note: setup.py
is not available after version 7.0.0
which break above commands (build/install). I created an issue here for the same.
Wait for the python3-docker
package upgrade to >=6.1.0
until Gramine announses support for ubuntu 24.04
. This would automatically fix the issue. I have created a bug for ubuntu here which is in confirmed state now.
Gramine and GSC currently don't claim official support for Ubuntu 24.04. So I think we can safely wait for option 3 -- this bug should be fixed in Ubuntu itself, and looks like there is no easy workaround for GSC at the moment.
So my suggestion is to sit and wait for ~2 months. If nothing happens in this time frame, then we should revisit this issue.
Description of the problem
gsc build fails for any distro workload on a Ubuntu 24.04 host system
As per gsc requirement
pip3 install docker jinja2 tomli tomli-w pyyaml
when we try to install these libraries, it fails with below errors.Ubuntu adopted PEP 668 from 23.04 , which dictates that
pip
can no longer install packages managed by the distro's general-purpose package manager, hence we useapt-get
. Above listed requirement are installed via apt, versions are mentioned belowdocker: 5.0.3 jinja2 : 3.1.2 tomli : 2.0.1 tomli-w : 1.0.0 pyyaml : 6.0.1
Steps to reproduce
https://github.com/gramineproject/gsc/tree/master/test#building-sample-images
Expected results
Actual results
Error: