Skip to content

Commit

Permalink
Merge pull request #523 from twilson271828/release
Browse files Browse the repository at this point in the history
Updated the Installation instructions based on user feedback.
  • Loading branch information
celbal authored Nov 8, 2018
2 parents 6442d04 + e1f7090 commit 357d488
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 29 deletions.
26 changes: 17 additions & 9 deletions isis/scripts/isis3VarInit.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/usr/bin/env python

import argparse
import os
import sys
#Author: Tyler Wilson
#Date : 2018-10-05
#Description: This script sets ISISROOT/ISIS3DATA/ISIS3TESTDATA for the user and is executed
#within the conda environment created for the ISIS3 installation.
#The data directory and test directory are optional command line arguments. If the user chooses
#not to set them, they will both be placed created on the same level as the $ISISROOT directory
#within the conda environment.

##########################################################################################################
# Author: Tyler Wilson
# Date : 2018-10-05
# Description: This script sets ISISROOT/ISIS3DATA/ISIS3TESTDATA for the user and is executed
# within the conda environment created for the ISIS3 installation.
# The data directory and test directory are optional command line arguments. If the user chooses
# not to set them, they will both be placed created on the same level as the $ISISROOT directory
# within the conda environment.
# History:
# Author: Tyler Wilson
# Date: 2018-11-01
# Description: Removed a pair of lines which were causing output errors on Mac OS X and were not
# required anyway.
#
##########################################################################################################

parser = argparse.ArgumentParser(description='Usage: ./isis3VarInit --data_dir <data dir path> --test_dir <test dir path')

Expand All @@ -35,8 +45,6 @@
os.popen('mkdir -p '+isisroot+'/etc/conda/activate.d')
os.popen('mkdir -p '+isisroot+'/etc/conda/deactivate.d')

os.system("echo -n '' >"+isisroot+"/etc/conda/activate.d/env_vars.sh")
os.popen("echo -n '' >"+isisroot+"/etc/conda/deactivate.d/env_vars.sh")
os.popen('touch '+isisroot+'/etc/conda/activate.d/env_vars.sh')
os.popen('touch '+isisroot+'/etc/conda/activate.d/env_vars.sh')

Expand Down
72 changes: 52 additions & 20 deletions isis/src/docsys/documents/InstallGuide/InstallGuide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,74 @@ you must <em>not</em> upgrade the ISIS Data Files!!!
<ol>
<li>Download either the Anaconda or Miniconda installation script for your OS platform. Anaconda is a much larger distribtion of packages supporting scientific python, while Miniconda is a minimal installation and not as large:
<a href="https://www.anaconda.com/download">Anaconda installer</a>, <a href="https://conda.io/miniconda.html">Miniconda installer</a></li>
<li>Open a terminal window in the directory where you downloaded the script, and run the following commands. In this example, we chose to do a full install of Anaconda, and our OS is Linux-based. Your file name may be different depending on your environment.</li>
<li>If you are running on some variant of Linux, open a terminal window in the directory where you downloaded the script, and run the following commands. In this example, we chose to do a full install of Anaconda, and our OS is Linux-based. Your file name may be different depending on your environment.</li>
<pre>
chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
./Anaconda3-5.2.0-Linux-x86_64.sh
<strong>chmod +x Anaconda3-5.2.0-Linux-x86_64.sh</strong>
<strong>./Anaconda3-5.2.0-Linux-x86_64.sh</strong>
</pre>

This will start the Anaconda installer which will guide you through the installation process.
<li>After the installation has finished, open up a bash prompt in your terminal window.</li>
<li>Create a new environment for your ISIS3 installation:
<li>If you are running Mac OS X, a pkg file (which looks similar to Anaconda3-5.3.0-MacOSX-x86_64.pkg) will be downloaded. Double-click on the file to start the installation process.</li>
<li>Again from within a terminal window, create a new environment for your ISIS3 installation:
<pre>
#Add the following channels to the Anaconda installation
conda config --add channels conda-forge, usgs-astrogeology

<em>#Add the following channels to the Anaconda installation</em>
<strong>conda config --add channels conda-forge</strong>
<strong>conda config --add channels usgs-astrogeology</strong>

#Verify you have the correct channels:
<strong>conda config --show channels</strong>

<em>#You should see:</em>

<strong>channels:</strong>
<strong> - usgs-astrogeology</strong>
<strong> - conda-forge</strong>
<strong> - defaults</strong>

<em>#The order is important. If conda-forge is before usgs-astrogeology, you will need to run:</em>

<strong>conda config --add channels usgs-astrogeology</strong>


#Create a new conda environment to install ISIS3 in
conda create -n isis3
<em>#Create a new conda environment to install ISIS3 in.</em>
<strong>conda create -n isis3</strong>

#Activate the environment
source activate isis3
<em>#Activate the environment</em>
<strong>source activate isis3</strong>

#Download the ISIS3 version
conda install -c usgs-astrogeology isis3
<em>#Download the ISIS3 version</em>
<strong>conda install -c usgs-astrogeology isis3</strong>

#Execute the ISIS3 variable initialization script with default arguments.
#This script prepares default values for: $ISISROOT/$ISIS3DATA/$ISIS3TESTDATA
<em>#Execute the ISIS3 variable initialization script with default arguments.</em>
<em>#This script prepares default values for: $ISISROOT/$ISIS3DATA/$ISIS3TESTDATA</em>

python $CONDA_PREFIX/scripts/isis3VarInit.py
<strong>python $CONDA_PREFIX/scripts/isis3VarInit.py</strong>

Executing this script with no arguments will result in $ISIS3DATA=$CONDA_PREFIX/data,
and $ISIS3TESTDATA=$CONDA_PREFIX/testdata. The user can specify different directories
for both of these optional values:

./$CONDA_PREFIX/scripts/isis3VarInit --data-dir=[path to data directory] --test-dir=[path to test data directory]
<strong>./$CONDA_PREFIX/scripts/isis3VarInit --data-dir=[path to data directory] --test-dir=[path to test data directory]</strong>


Directions for running rsync to download ISIS3 data can be found <a href="#ISIS3DataDownload">here.</a>


<em>#Run the source activate command a second time to process the changes:</em>

<strong>source activate isis3</strong>

To avoid having to do this every time you open a new terminal window, we suggest adding the following lines to the end of your .bashrc file
(if running a variant of Linux) to ensure that conda is in your PATH variable. If you are running Mac OS X, these lines would be appended
to the end of your .bash_profile file:


<strong>source activate isis3</strong>
<strong>python $CONDA_PREFIX/scripts/isis3VarInit.py</strong>
<strong>source activate isis3</strong>

#Run the source activate command a second time to process the changes:

source activate isis3

</pre>
</li>
Expand Down Expand Up @@ -173,7 +204,7 @@ is a popular choice and may be downloaded below.
</ul>
</p>


<A NAME="ISIS3DataDownload"></A>
<h3>Full ISIS3 Data Download</h3>

<p>
Expand Down Expand Up @@ -494,6 +525,7 @@ is a popular choice and may be downloaded below.
<history>
<change name="Kristin Berry" date="2018-08-28">Original Version</change>
<change name ="Tyler Wilson along with the ASC Development Team" date="2018-09-26">Updated version to incorporate installation through Conda</change>
<change name="Tyler Wilson" date="2018-10-01">Updated version after feedback was received from outside users.</change>
</history>


Expand Down

0 comments on commit 357d488

Please sign in to comment.