Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the RMG Installation Documentation #1534

Merged
merged 5 commits into from
Jan 30, 2019
Merged

Update the RMG Installation Documentation #1534

merged 5 commits into from
Jan 30, 2019

Conversation

amarkpayne
Copy link
Member

Motivation or Problem

There are a few issues with our current documentation for installing RMG as we found out at the RMG Workshop 2019. We also lack documentation for installation on the Ubuntu subsystem on Windows 10, which appears to be a viable route for people who cannot run a virtual machine. This PR aims to address these problems, as well as clean up and improve the documentation in general.

@codecov
Copy link

codecov bot commented Jan 18, 2019

Codecov Report

Merging #1534 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1534   +/-   ##
=======================================
  Coverage   42.01%   42.01%           
=======================================
  Files         165      165           
  Lines       27873    27873           
  Branches     5680     5680           
=======================================
  Hits        11711    11711           
  Misses      15377    15377           
  Partials      785      785

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72fb120...2c67fbe. Read the comment docs.

@amarkpayne amarkpayne added Status: Ready for Review PR is complete and ready to be reviewed and removed Status: Blocked This PR should not be merged labels Jan 21, 2019
@amarkpayne amarkpayne requested a review from alongd January 21, 2019 02:17
@amarkpayne
Copy link
Member Author

I think this PR is ready for review now. There are two things I was also considering adding to this PR:

  1. A link to a Linux tutorial for Windows users new to Linux.
  2. Docker images with RMG installed in them, and documentation for it.

If either of these features would be worth including, let me know and I'll add them (I was on the fence about adding both).

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! See some minor comments

@@ -4,12 +4,19 @@
Installation by Source Using Anaconda Environment for Unix-based Systems: Linux and Mac OSX
*******************************************************************************************

* Download and install the `Anaconda Python Platform <https://www.anaconda.com/download/>`_ for Python 2.7 (make sure not to install Python 3.0+, which is incompatible with RMG). When prompted to append Anaconda to your PATH, select or type Yes. Install the Anaconda folder inside your home directory (typically ``/home/YourUsername/`` in Linux and ``/Users/YourUsername`` in Mac).
* Download and install the `Anaconda Python Platform <https://www.anaconda.com/download/>`_ for Python 2.7 (make sure not to install Python 3.0+, which is incompatible with RMG). **When prompted to append Anaconda to your PATH, select or type Yes**. Install the Anaconda folder inside your home directory (typically ``/home/YourUsername/`` in Linux and ``/Users/YourUsername`` in Mac). You do NOT need to install Microsoft VSCode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re VSCode, maybe note for context something like:
You do NOT need to install Microsoft VSCode (you will be prompted to by the installer)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add a line saying that they can install it if they need an editor? I think VSCode is the best lightweight IDE currently available.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -20,36 +27,34 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux
For Linux users: ::

cd RMG-Py
source ~/.bashrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time, users install Anaconda and do not open a new terminal before trying to create the conda environment. This causes an error because while anaconda was added to their path, they need to re-source their .bashrc file for bash to recognize the conda command. There is never any harm in re-sourcing your .bashrc file, and this saves new bash users some headache. Experienced Linux users will be able to decide if they need this line or not.

Alternatively, I can just add a note below this saying something like "If you get an error about the command conda not being found, then make sure that it is in your .bashrc and resource your .bashrc"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK (no need to add further explanation)

@@ -0,0 +1,43 @@
.. _ubuntuSubsystem:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we call it Ubuntu Subsystem? The official name is "Windows Subsystem for Linux". I think that "Linux Subsystem" is a good short name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make this change, thanks for the suggestion!

<https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_. The basic steps include enabling the Windows Linux
subsystem from a powershell **run as an administrator**, and downloading the latest LTS version of Ubuntu
*from the Windows store*. We highly recommend Ubuntu over the other Linux distros, as Ubuntu is used by many of the
RMG developers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add something like (note that a Linux subsystem can only be installed on Windows 10 build 16215 or later)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Hopefully most people are on this build by now, but it is certainly worth adding to the documentation.

1. Follow the instructions provided by Microsoft to install the Ubuntu subsystem, available `here
<https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_. The basic steps include enabling the Windows Linux
subsystem from a powershell **run as an administrator**, and downloading the latest LTS version of Ubuntu
*from the Windows store*. We highly recommend Ubuntu over the other Linux distros, as Ubuntu is used by many of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distros = distributions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, I'll make this change for clarity.

<https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_. The basic steps include enabling the Windows Linux
subsystem from a powershell **run as an administrator**, and downloading the latest LTS version of Ubuntu
*from the Windows store*. We highly recommend Ubuntu over the other Linux distros, as Ubuntu is used by many of the
RMG developers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of We highly recommend Ubuntu over the other Linux distros, as Ubuntu is used by many of the RMG developers., maybe just: We recommend Ubuntu (for which these instructions were made) over the other Linux distributions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

*from the Windows store*. We highly recommend Ubuntu over the other Linux distros, as Ubuntu is used by many of the
RMG developers.

2. Once the Ubuntu subsystem is installed, open an Ubuntu terminal. Open a web browser in Windows and go to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe direct them to first copy the link, then open a terminal to paste it?
Also, is it worth noting one of the ways of opening a terminal in Ubuntu?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestions, I have made this more clear

sudo apt install make
sudo apt-get install libxrender1

5. Follow the instructions for either the binary or source installation for the Linux Operating system.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If their the same, maybe direct to one of them and specify exactly what point to continue from.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the links here, but maybe we should have a discussion about what we should recommend to users when they are trying to choose between the RMG binaries or from source.

1. Restart the PC. As soon as the PC turns back on, enter the BIOS settings (this usually involves pressing the ``F2``
or ``F12`` keys, but will depend on your make/model). If you see the computer loading Windows then you have missed the
opportunity, and should restart the PC to try again. If Secure Boot is enabled on your PC then there may be additional
steps to reaching the BIOS settings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence needs a tiny addition, perhaps something like which you should look for online?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an additional link here


**Note that changing your BIOS settings can be risky, so follow online tutorials carefully**. If you are unsure of what
to do even after looking for online tutorials, consider following the instructions for installing RMG inside the Linux
subsystem in Windows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added a link here to these instructions

@alongd
Copy link
Member

alongd commented Jan 22, 2019

I think a Linux tutorial link is harmless, and should probably be added.
What do we think of the RMG docker images? Were they successful at the workshop? Or were users limited?


Install the anaconda2 folder inside your home directory (it should be the default location when it asks for a location
to install). **When prompted to append Anaconda to your PATH, select or type Yes**. You do NOT need to install Microsoft
VSCode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, perhaps we should say explicitly to not install VSCode, and to do it directly from Windows if they want it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

of ``Anaconda2-2018.12-Linux-x86_64.sh`` to match the name of the script you downloaded. ::

chmod 744 Anaconda2-2018.12-Linux-x86_64.sh
./Anaconda2-2018.12-Linux-x86_64.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer calling bash directly: bash Anaconda2-2018.12-Linux-x86_64.sh. I feel like it's easier for users since they don't need chmod. I would recommend changing it for all of the other pages as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion!

First, check to see if virtualization technology is currently enabled on your computer by opening the Task Manager in
Windows. Click on the ``Performance`` tab--from here you can see if virtualization technology is enabled.

.. image:: images/Virtualization_Enabled.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing image?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot that images were in the .gitignore file

in your BIOS settings.

First, check to see if virtualization technology is currently enabled on your computer by opening the Task Manager in
Windows. Click on the ``Performance`` tab--from here you can see if virtualization technology is enabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for Windows 7?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it does not, only for Windows 8 and later. I have added the appropriate instructions for Windows 7 and earlier.

@mliu49
Copy link
Contributor

mliu49 commented Jan 22, 2019

We don't have any first-hand experience with RMG docker images. It was reportedly successful for the high-performance computing cluster at Auburn, where it was set up by their sysadmins. We would need more time to investigate that as an option for general users.

@amarkpayne
Copy link
Member Author

I have made the requested changes, let me know what you guys think. I will look into using docker images, but I think this is best left to another PR.

@amarkpayne
Copy link
Member Author

If there aren't any objections, I'll go ahead and squash the fix-up commits to get this ready to merge. If I need to make additional changes let me know though.

@amarkpayne amarkpayne force-pushed the doc_updates branch 2 times, most recently from 6b6d3a2 to 338a4d9 Compare January 27, 2019 05:41
- Ensure that basic compilers are installed
- Ensure that .bashrc is updated after installing Anaconda
- Update .bashrc PATH additions
- rmg.py is now called in the exact same way as the binary version for consistency
linuxSubsystem

For users unfamiliar with bash or Linux, we recommend looking at online tutorials such as the one
`here <https://www.guru99.com/unix-linux-tutorial.htmlhttps://www.guru99.com/unix-linux-tutorial.html>`_. To start out
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the link here duplicated on purpose?
(could you compile the documentation and make sure all links work?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is a mistake. Thanks for the catch!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the remaining links and they all seemed to work. I am pretty sure that I checked them before, but most browsers are also able to deal with this duplication properly. I also looked through the code, and this was the only duplication I found.

@alongd
Copy link
Member

alongd commented Jan 30, 2019

OK, looks good to me! @mliu49, any comments?

Copy link
Contributor

@mliu49 mliu49 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@alongd alongd merged commit b7e9d1c into master Jan 30, 2019
@alongd alongd deleted the doc_updates branch January 30, 2019 19:55
@mliu49 mliu49 mentioned this pull request May 15, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants