Advertisement
Mark2020H

Bash Script for installing jupyter note book & Julia stable version

Aug 3rd, 2022 (edited)
1,727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.40 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. ## Bash Script  created  for students  who want to install jupyter note book & Julia on  ubuntu versions 18
  4. ##  64 bit  version  only
  5.  
  6.  
  7. ## Please note ************* this has not been tested on other OS  at present *************
  8. ## No responsibility will be  accepted You use this at your own risk  ****** Its up to you to check and test *****
  9.  
  10. ## Feel free to alter and use as required
  11.  
  12. ## to run  chmod this script with the  chmod +s command  
  13.  
  14.  
  15. clear
  16. ls /etc/*release
  17.  
  18. # display the release
  19. cat /etc/os-release
  20.  
  21. # greet the user
  22. echo "Hi $USER This script will install Julia programming language and  "
  23.  
  24.  
  25. sleep 5
  26.  
  27. # download the  Julia version 64 bit os for  Linux
  28.  
  29. echo " Grabbing hold of Julia 1.7.3 Linux 64 bit please wait till complete "
  30. sleep 5
  31. wget "https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.3-linux-x86_64.tar.gz"
  32. sleep 5
  33. clear
  34. # extract the files to home directory
  35.  
  36. echo "Extracting  file to julia please wait till complete  "
  37. sleep 5
  38. tar -xvf julia-1.7.3-linux-x86_64.tar.gz -C /home/$USER/
  39.  
  40. # create a softlink for Julia in /usr/bin
  41. echo "Creating softlink  for julia executable"
  42. ln -s /home/$USER/julia-1.7.3/bin/julia /usr/bin/julia
  43. echo "Installing jupyter for you please wait"
  44.  
  45. # install  jupyter notebook using pip3
  46.  
  47. pip3 install jupyter
  48. sleep 5
  49.  
  50. # create and prompt user for password to use  jupyter  notebook
  51.  
  52. echo "Creating jupyter password  for you  please complete  "
  53. sleep 5
  54. jupyter notebook password
  55. echo
  56. echo
  57.  
  58. # create a bash script  in home directory to run note book
  59. echo "Setting up bash script to run jupyter notebook "
  60. touch notebook.sh
  61.  
  62. # add  command lines to bash script
  63. echo '#!/usr/bin/env bash' > notebook.sh
  64. echo 'Starting note book for julia' >> notebook.sh
  65. echo 'jupyter notebook' >> notebook.sh
  66.  
  67. #chmod this for executable  file
  68.  
  69. chmod +x notebook.sh
  70.  
  71. echo "Should all be done for you Starting Julia command line version "
  72. echo "Please follow instructions at this site to  set up Jupyter notebook for Julia "
  73. echo "https://datatofish.com/add-julia-to-jupyter/ Opening  firefox  with address "
  74.  
  75. # auto open web page in browser to display instructions for using notebook
  76. # with  Julia
  77.  
  78. firefox -new-tab 'https://datatofish.com/add-julia-to-jupyter/'
  79.  
  80. # finish  hopefully all works
  81. echo "Hope that helps !! Mark Harrington  Now its read up and learn  enjoy "
  82.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement