-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker compose v2 support in local mode #4038
Comments
Also see #3613. |
In case anyone runs in to this, depending how docker compose is installed one has to add a shim for It would be ideal if the sdk could find the new executable to avoid the shim. Users could install compose as normal then. Right now it looks like below. We could remove the shim if the sdk found sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# We have to add this script
cat << EOF | sudo tee /usr/local/bin/docker-compose
#!/bin/bash
docker compose --compatibility "\$@"
EOF
chmod +x /usr/local/bin/docker-compose |
Any movement on this? I have tried several different methods in my CI pipeline to no avail. |
What kind of issues are you running in to? Do you have a traceback? Did you add a shim in to map compose to |
Describe the bug
Local mode execution currently just uses "docker-compose" and dosen't use the newer "docker compose".
The _compose function @ image,py should attempt to find both docker compose executables and use the one thats available with v2 (docker compose) being the first option.
relevant code to change:
sagemaker-python-sdk/src/sagemaker/local/image.py
Lines 96 to 103 in 6a7002e
sagemaker-python-sdk/src/sagemaker/local/image.py
Lines 712 to 730 in 6a7002e
To reproduce
Install the latest version of SageMaker SDK and attempt to run a processing or training task in local mode.
Expected behavior
local mode execution should attempt to find both docker compose executables ("docker compose" , "docker-compose" in the listed order) and use the one thats available. "docker compose" the newer version should be the preferred option if both executables are found in the runtime environment.
System information
Additional context
The custom docker image was working in local mode until the dependency package (docker-compose 1.29.2) was removed local requirements as part of release v2.164.0
The text was updated successfully, but these errors were encountered: