aws-samples / sagemaker-studio-lifecycle-config-examples

MIT No Attribution
81 stars 53 forks source link

scripts/install-lsp-features/on-jupyter-server-start.sh causes studio to fail #39

Open jmahlik opened 1 year ago

jmahlik commented 1 year ago

On sagemaker studio with jupyter lab version 3, the script installs incompatible dependencies. This causes the launcher to be completely removed from studio with no way to recover (not even deleting and recreating the jupyter server app is recoverable). The only way to recover it to totally delete a user's profile and re-create them.

https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples/blob/be187b588255a83ed5137d95791b2e1dd1c2bfd1/scripts/install-lsp-features/on-jupyter-server-start.sh#L28-L31

It seems the dependencies should be pinned to compatible versions in the script to avoid this issue.

Output:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sagemaker-sharing 0.1 requires attrs==21.4.0, but you have attrs 23.1.0 which is incompatible.
sagemaker-sharing 0.1 requires jsonschema==4.17.3, but you have jsonschema 4.19.0 which is incompatible.
sagemaker-sharing 0.1 requires jupyter-client==7.1.2, but you have jupyter-client 7.4.9 which is incompatible.
sagemaker-sharing 0.1 requires notebook-shim==0.1.0, but you have notebook-shim 0.2.3 which is incompatible.
sagemaker-sharing 0.1 requires packaging==21.3, but you have packaging 23.1 which is incompatible.
sagemaker-sharing 0.1 requires pyzmq==22.3.0, but you have pyzmq 25.1.1 which is incompatible.
sagemaker-sharing 0.1 requires Send2Trash==1.8.0, but you have send2trash 1.8.2 which is incompatible.
sagemaker-sharing 0.1 requires tornado==6.1, but you have tornado 6.3.3 which is incompatible.
sagemaker-sharing 0.1 requires traitlets==5.2.2.post1, but you have traitlets 5.9.0 which is incompatible.
sagemaker-nb2kg 0.1 requires jsonschema==4.17.3, but you have jsonschema 4.19.0 which is incompatible.
sagemaker-nb2kg 0.1 requires jupyter-client==7.1.2, but you have jupyter-client 7.4.9 which is incompatible.
sagemaker-nb2kg 0.1 requires tornado==6.1, but you have tornado 6.3.3 which is incompatible.
jupyter-server-mathjax 0.2.5 requires jupyter-server~=1.1, but you have jupyter-server 2.7.3 which is incompatible.