UBC-MDS / UBC-MDS.github.io

UBC MDS blog and academic site
https://ubc-mds.github.io
Other
14 stars 37 forks source link

Updating the Ubuntu Installation Guide #215

Closed andytai7 closed 2 months ago

andytai7 commented 2 months ago

Edits to the Installation Guide for MDS on Ubuntu (worked through half of it)

Google Chrome Installation (maybe adding these steps)

To install Google Chrome, follow these steps:

  1. Open the terminal.
  2. Navigate to the Downloads directory:
    cd ~/Downloads
  3. Install the package:
    sudo dpkg -i google-chrome-stable_current_amd64.deb
  4. Enter your password when prompted.

VSCode Installation (Again adding this step)

To install VSCode, use the following command in the terminal:

sudo snap install code --classic

Python Conda and JupyterLab Installation (Bolding restart your terminal)

After installing Conda and JupyterLab, restart your terminal to ensure all environment variables are properly configured.

RStudio Installation (some installation errors, maybe adding these steps?)

  1. Download the RStudio .deb package.
  2. Open the terminal and navigate to the Downloads directory:
    cd ~/Downloads
  3. Install the RStudio package:
    sudo dpkg -i rstudio-2024.04.2-764-amd64.deb
  4. If you encounter dependency issues, you will see an error message similar to this:
    dpkg: dependency problems prevent configuration of rstudio:
    rstudio depends on libssl-dev; however:
     Package libssl-dev is not installed.
    rstudio depends on libclang-dev; however:
     Package libclang-dev is not installed.
    dpkg: error processing package rstudio (--install):
    dependency problems - leaving unconfigured
  5. Install the missing dependencies:
    sudo apt-get install libssl-dev libclang-dev
  6. If you encounter the following error:

    [3017:0729/154510.072609:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/rstudio/chrome-sandbox is owned by root and has mode 4755.
    Trace/breakpoint trap (core dumped)

    Fix it by setting the correct ownership and permissions for chrome-sandbox:

    sudo chown root:root /usr/lib/rstudio/chrome-sandbox
    sudo chmod 4755 /usr/lib/rstudio/chrome-sandbox

    The issue was due to incorrect ownership and permissions of the chrome-sandbox binary, preventing RStudio from using its security sandboxing feature, which was resolved by setting the correct ownership (root:root) and permissions (4755).

GPU Errors in RStudio ( not sure what this erorr is)

Seems to be some GPU errors when starting RStudio:

[3991:0729/155702.700121:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[3991:0729/155702.703329:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[4045:0729/155703.091220:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[4045:0729/155703.094629:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization

Stan Installation (Just mentioning it so that students don't install it again)

Stan should already be installed as part of the previous installation steps, so maybe we should mention it here.

Jupyter lab short cuts

Maybe the screen shot of what the settings saved should look like should elaborate that all the old JSON should be underneath it for the default short cuts. Is this something we want for students?

LaTeX

Seems like the ms package doesn't exist for jupyter, error occurs when inputing: tlmgr install ms

Should add, if the above command fails, try installing a few packages at a time instead of all of them at once.

andytai7 commented 2 months ago

Everything else seems to work great! Please let me know if i can make these changes: @joelostblom @chendaniely, and i can make a pull request.

joelostblom commented 2 months ago

Thanks for these suggestions @andytai7 ! Here are my thoughts:

Google Chrome Installation (maybe adding these steps)

I don't think we need to add detailed steps on how to install browsers for any of the installation guides. They probably have one of these installed already and it is common enough that they will easily be able to find it elsewhere if they can't figure it out

VSCode Installation (Again adding this step)

I don't think we need this either since we do link the snap web page and when they click "install" there they will see the possible options (and they might prefer to use the desktop store)

Python Conda and JupyterLab Installation (Bolding restart your terminal)

Sounds good! Make sure it is the same for the other OSes too

RStudio Installation (some installation errors, maybe adding these steps?)

Hmmm, these installation errors seem like they could be possibly confusing so it would be good to add a note on them. I'm imagining that a lot of students might install by clicking the installer deb file rather than running dpkg and I don't remember seeing these installation errors last year when doing that, could you try installing it via the deb file in a virtual box Ubuntu setup to see if this replicates? If it does we could add the notes you mentioned, but it is a bit confusing/complicated that they would need to change permissions on the chrome sandbox files so I would like to avoid that if possible.

GPU Errors in RStudio ( not sure what this erorr is)

I'm not sure here either

Stan Installation (Just mentioning it so that students don't install it again)

Maybe move the installation steps from the previous section down here?

Jupyter lab short cuts

I don't quite understand what you mean here, could you elaborate?

LaTeX, try installing a few packages at a time instead of all of them at once.

Hmm it shouldn't be a difference if you install separately or all at once. What do you mean that the package doesn't exist for jupyter? tlmgr does not relate to jupyter I believe.

andytai7 commented 2 months ago

Sounds good! Make sure it is the same for the other OSes too

Will do I will make the changes via PR

Hmmm, these installation errors seem like they could be possibly confusing so it would be good to add a note on them. I'm imagining that a lot of students might install by clicking the installer deb file rather than running dpkg and I don't remember seeing these installation errors last year when doing that, could you try installing it via the deb file in a virtual box Ubuntu setup to see if this replicates? If it does we could add the notes you mentioned, but it is a bit confusing/complicated that they would need to change permissions on the chrome sandbox files so I would like to avoid that if possible.

I will try this again and see what happens.

Maybe move the installation steps from the previous section down here?

Will do, I will make the changes via PR

I don't quite understand what you mean here, could you elaborate?

Here in the Jupyter notebook user preferences, there are other shortcuts that come as default. Do we want students to delete all of the default shortcuts, or keep them and add the custom ones that we want students to add? 

If we want students to keep the default shortcuts, then the screenshot should have something like … in the end to emphasize that they should keep the default shortcuts.

Screenshot 2024-08-12 at 3 20 08 PM

Hmm it shouldn't be a difference if you install separately or all at once. What do you mean that the package doesn't exist for jupyter? tlmgr does not relate to jupyter I believe.

That was a typo. The MS package for tlmgr is either depreciated or does not exist anymore. With testing it seems like everything LaTeX works without it, so I suggest taking it out.

joelostblom commented 2 months ago

If we want students to keep the default shortcuts, then the screenshot should have something like … in the end to emphasize that they should keep the default shortcuts.

Ah ok I see what you mean. I don't think we need to modify the screenshot, but feel free to add a clarification in the text that they should not delete any existing shortcuts, just add the new ones.

That was a typo. The MS package for tlmgr is either depreciated or does not exist anymore. With testing it seems like everything LaTeX works without it, so I suggest taking it out.

If everything works without it, then it sounds good to take it out. I know @chendaniely mentioned previously that we might use quarto for all PDF export needs, so we might not even need latex anymore? But that's a bigger change so let's start with taking out this package if it no longer exists. Can you add the change to your PR?

andytai7 commented 2 months ago

Both of these changes are now reflected in the PR.

chendaniely commented 2 months ago

closing since this has been addressed in #217