amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

how to install scala kernel to sagemaker's jupyter?

Open richardxin opened this issue 8 years ago • 7 comments

is scala supported in jupyter notebook under sagemaker? if not, how to install scala kernel to sagemaker's jupyter?

richardxin avatar Jan 20 '18 16:01 richardxin

Hi @richardxin . I was able to install the Scala kernel on a SageMaker Notebook Instance by:

  1. Opening a terminal from the Notebook dashboard
  2. running git clone https://github.com/jupyter-scala/jupyter-scala.git
  3. cd jupyter-scala
  4. ./jupyter-scala
  5. When that completed, exiting from the terminal, refreshing the Notebook dashboard page, and selecting "Scala" from the "New -> Notebook" menu.

Just to confirm, there isn't any special support for Scala in SageMaker at the moment. So, we don't have an equivalent to the SageMaker Python SDK for Scala.

Best of luck, and thanks for your interest in SageMaker!

djarpin avatar Jan 22 '18 17:01 djarpin

Thanks

richardxin avatar Jan 22 '18 17:01 richardxin

This doesnt work anymore.

vlall avatar Oct 18 '18 08:10 vlall

I can confirm @vlall's point--specifically, the ./jupyter-scala command returns an error. @richardxin, any idea as to how to install it now?

mct0006 avatar Nov 29 '18 16:11 mct0006

Hi @vlall and @mct0006,

Looks like the repo @djarpin mentioned before has been revamped this year and the previous instructions are out of date.

In the updated repo's README, I discovered the installation instructions through their project website: http://almond-sh.github.io/almond/stable/docs/quick-start-install I was able to install the Scala kernel following those instructions. Hopefully that helps!

chriszheng10 avatar Nov 29 '18 17:11 chriszheng10

Unfortunately, the original instruction is obsolete, and the installation instructions link above is now dead. For those who struggle with this like I did, here's how I installed the Scala kernel in my SageMaker Jupyter Notebook instance:

1/ Open Jupyter Lab (I personally find it easier to work in Jupyter Lab) 2/ File > New > Terminal 3/ In the terminal, run git clone https://github.com/jupyter-scala/jupyter-scala.git 4/ Once the repository has been cloned, cd jupyter-scala 5/ cd scripts 6/ Run ls. Verify that you have coursier.sh and generate-launcher.sh in the current directory 7/ Run vi generate-launcher.sh to edit this script 8/ Press "insert" to start editing. Find the line coursier bootstrap \ and change it to ./coursier.sh bootstrap\. Save and exit vim 9/ Run ./generate-launcher.sh 10/ Run ls. Verify that the file almond is now present in the current directory 11/ Run ./almond --install

dinhnguyen92 avatar Feb 10 '19 00:02 dinhnguyen92

I've been happy with https://pypi.org/project/spylon-kernel/ both on my laptop and on sagemaker

pip install spylon-kernel
# or
conda install -c conda-forge spylon-kernel
python -m spylon_kernel install

Launch jupyter notebook and you should see a spylon-kernel as an option in the New dropdown menu.

arash2060 avatar Oct 19 '20 19:10 arash2060