sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

Relax the docker version for local mode extra

Open jmahlik opened this issue 1 year ago • 0 comments

Describe the bug Currently, the docker major version is restricted to docker~=5.0.0 in the local extras.

This makes installing sagemaker into a windows python 3.10 environment quite difficult, or not possible if there are other transitive deps relying on docker. Docker 5.0.0 fails to install due to a transitive pinned dep on pywin32 which doesn't work with python 3.10.

Docker released 6.0.0 which would make installation possible on windows. According to the maintainers, it should be api compatible with 5.x . Consider bumping the max allowable version of docker to 6. This would allow users to pin docker as needed and make installation possible on windows python 3.10.

There's not really a workaround other than relaxing the docker version or downgrading python to 3.9. Python 3.9 is discontinuing binary installers with the next release, so keeping python 3.9 up to date with security fixes will not be easy for the majority of python users on windows (building from source is not fun on windows).

https://github.com/docker/docker-py/releases/tag/6.0.0

https://github.com/docker/docker-py/pull/3004

To reproduce requirements.txt

sagemaker[local]==2.105.0
docker>=5.0.0

constraints.txt

docker>=6.0.0; platform_system == "Windows"
python -m pip install sagemaker[local]==2.105.0 # pinned docker pywin32 isn't installable in windows 3.10
python -m pip install -r requirements.txt # does not resolve
# or 
python -m pip install -r requirements.txt -c constraints.txt # does not resolve

Expected behavior Installation on windows with python 3.10.

Screenshots or logs If applicable, add screenshots or logs to help explain your problem.

System information A description of your system. Please provide:

  • SageMaker Python SDK version: 2.105.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): n/a
  • Framework version: n/a
  • Python version: 3.10.6
  • CPU or GPU: cpu
  • Custom Docker image (Y/N): N

Additional context Add any other context about the problem here.

jmahlik avatar Aug 23 '22 20:08 jmahlik