aws / sagemaker-distribution

A set of Docker images that include popular frameworks for machine learning, data science and visualization.
Apache License 2.0
91 stars 51 forks source link

Add gnupg2 to the SageMaker Distribution #158

Open athewsey opened 8 months ago

athewsey commented 8 months ago

For organizations that sign git commits with GPG, it would be helpful if GPG was installed in the SageMaker distribution by default?

For now, I've got it working by adding an entry to the SMStudio lifecycle configuration script like below, to install at run time:

if ! command -v gpg &> /dev/null
then
    echo "gpg not found: Trying to sudo apt-get install gnupg2"
    sudo apt-get install gnupg2
fi
athewsey commented 8 months ago

Recently, I'm finding that the above no longer works properly with password-protected GPG keys in SMStudio... Trying to git commit produces:

error: gpg failed to sign the data

...and trying to gpg -s just hangs without prompting for the key password. pinentry seems to be installed fine, and killing gpg-agent doesn't seem to help.

athewsey commented 4 months ago

Finally found a workaround that seems to solve the pinentry failures (on SageMaker Distribution 1.7)... Run:

export GPG_TTY=$(tty)