Commit 73b2ade9 authored by Summer Stapleton's avatar Summer Stapleton
Browse files

Merge branch 'cmake' of github.com:USGS-Astrogeology/ISIS3 into cmake

parents 6bf98878 bda79986
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ dependencies:
  - mysql-connector-c==6.1.6=0
  - nanoflann==1.2.2
  - ninja==1.7.2=0
  - nn==1.86.0=2
  - conda-forge/label/gcc7::nn
  # - numpy==1.13.3=py36_blas_openblas_200
  - openblas==0.2.19=2
  - opencv
+52 −0
Original line number Diff line number Diff line
#!/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.

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

parser.add_argument("--data-dir",default= data_dir,help="ISIS3 Mission Data Directory")
parser.add_argument("--test-dir",default=testdata_dir,help="ISIS3 Mission Test Data Directory")

args=parser.parse_args()
if (data_dir != args.data_dir):
    os.system("mkdir -p "+args.data_dir)
    data_dir = args.data_dir
else:    
    os.system("mkdir -p "+data_dir)

if (testdata_dir != args.test_dir):
    os.system("mkdir -p "+args.test_dir)
    testdata_dir=args.test_dir
else:
    os.system("mkdir -p "+testdata_dir)

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')

os.popen("echo '#!/bin/sh' >> "+isisroot+ "/etc/conda/activate.d/env_vars.sh")
os.popen("echo 'export ISISROOT="+isisroot+"' >>"+isisroot+"/etc/conda/activate.d/env_vars.sh")
os.popen("echo 'export ISIS3DATA="+data_dir+"' >>"+isisroot+"/etc/conda/activate.d/env_vars.sh")
os.popen("echo 'export ISIS3TESTDATA="+testdata_dir+"' >>"+isisroot+"/etc/conda/activate.d/env_vars.sh")

os.popen("echo '#!/bin/sh' >> "+isisroot+ "/etc/conda/deactivate.d/env_vars.sh")
os.popen("echo 'unset ISISROOT' >>"+isisroot+"/etc/conda/deactivate.d/env_vars.sh")
os.popen("echo 'unset ISIS3DATA' >>"+isisroot+"/etc/conda/deactivate.d/env_vars.sh")
os.popen("echo 'unset ISIS3TESTDATA' >>"+isisroot+"/etc/conda/deactivate.d/env_vars.sh")
+137 −54
Original line number Diff line number Diff line
@@ -24,28 +24,129 @@ you must <em>not</em> upgrade the ISIS Data Files!!!
-->
  <h2>Overview</h2>

  <p>
    This installation guide is for ISIS3 users interested in installing ISIS3 (3.6.0)+ through conda.  
    If you are a developer, we refer you to our <a href="https://github.com/USGS-Astrogeology/ISIS3">GitHub repository.</a>
  </p>


  <h3>ISIS3 Installation With Conda</h3>
    <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>
        <pre>
          chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
          ./Anaconda3-5.2.0-Linux-x86_64.sh          
        </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:
        <pre>
          #Add the following channels to the Anaconda installation
          conda config --add channels conda-forge, usgs-astrogeology
          

          #Create a new conda environment to install ISIS3 in
          conda create -n isis3

          #Activate the environment
          source activate isis3

          #Download the ISIS3 version
          conda install -c usgs-astrogeology isis3
          
          #Execute the ISIS3 variable initialization script with default arguments.
          #This script prepares default values for:  $ISISROOT/$ISIS3DATA/$ISIS3TESTDATA

          python $CONDA_PREFIX/scripts/isis3VarInit.py

         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]


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

          source activate isi

        </pre>
      </li>
    </ol>
  <h3>Operating System Requirements</h3>
  <p>ISIS runs on many UNIX variants. ISIS does not run on MS Windows. The UNIX variants supported are listed here:</p>
  <p>ISIS3 runs on many UNIX variants. ISIS does not run natively on MS Windows,
     although it has been successfully run on Windows 10 using the Windows
     Subsystem for Linux (WSL).  Instructions for doing this can be found
     <a href="#RunningOnWindows">here.</a>

    The UNIX variants ISIS3 has been successfully built on are:</p>
    <ul>
      <li>Ubuntu 18.04 LTS</li>
      <li>Mac OS X 10.13.6 High Sierra</li>     
      <li>CentOS Linux 7.2.1511</li>
      <li>Fedora 28</li>
    </ul>


    <p>ISIS3 is also built and tested nightly on the following operating systems.</p>

    <ul>      
      <li>Debian Linux 8 (jessie)</li>      
      <li>Fedora 25</li>
      <li>Mac OS X 10.11.6</li>
    </ul>
<p>
    ISIS3 may be run on other operating systems then those listed above,
    but it has not been tested.
</p>
   <h3>Hardware Requirements</h3>
   <p>Here are the minimum hardware requirements</p>
    <ul>
      <li>64-bit (x86) processors</li>
      <li>2 GB memory</li>
      <li>10 GB to 180 GB disk space for ISIS installation</li>
      <li>2 GB RAM</li>
      <li>2.5 GB of disk space for ISIS3 binaries</li>
      <li>10 GB to 510 GB disk space for ISIS3 data</li>
      <li>10 GB to many TB disk space for processing images</li>
      <li>A quality graphics card</li>
    </ul>
<p>Note: More processors, memory, disk storage, and an additional graphcis card (to support the use of two monitors at
one time) may be useful depending on the complexity of your processing requirements


<A NAME="RunningOnWindows"> </A>
<h3>Running ISIS3 on Windows 10</h3>
  <ul>
    <li><a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">Installing the Windows Subsystem for Linux</a></li>
    <li><a href="http://planetarygis.blogspot.com/2017/07/isis3-on-windows-10-bash.html">Instructions for using the Windows
      Subsystem for Linux (WSL) to run ISIS3</a></li>
  </ul>
  <p>
  While the ISIS3 development team has not examined these
  instructions for correctness or completeness, they appear to have
  successfully worked for a number of ISIS3 users within the USGS who run Windows.
  Thanks for these instructions are directed towards Trent Hare who maintains an
  excellent and thoughtful blog on <a href="http://planetarygis.blogspot.com/">Planetary GIS Science.</a>
  </p>

<A NAME="RunningOnWindowsWithSSH"> </A>
<h3>Setting Up X11 forwarding on Windows with Putty and Xming</h3>
<p>
Some ISIS3 users prefer to run ISIS3 in Windows, but SSH into a computer
that is running ISIS3 and has enabled X11 forwarding.  This requires the
installation of an X server on Windows.  Below are links to two popular choices
in Astrogeology.
</p>
  <ul>
    <li><a href="https://sourceforge.net/projects/xming/">Xming X server for Windows</a></li>
    <li><a href="https://sourceforge.net/projects/vcxsrv/">VcXsrv Windows X Server</a></li>
  </ul>
<p>
Additionally, a Windows SSH client is required to create an SSH connection.  PuTTY
is a popular choice and may be downloaded below.
</p>
<ul>
    <li><a href="https://www.putty.org/">PuTTY - an SSH and telnet client for the Windows platform.</a></li>
</ul>

   <h3>Mission Requirements</h3>
   <p>ISIS3 supports many planetary missions; in fact, over 40 different instruments including some
   flown as early as the 1960s.  Ancillary data are required to process images from these instruments.  For example, translation
@@ -59,7 +160,7 @@ one time) may be useful depending on the complexity of your processing requireme
   </p>

   <h3>DTM Requirements</h3>
   <p>The strength of ISIS 3 strength lies in its capabilities for planetary cartography.
   <p>The strength of ISIS3 lies in its capabilities for planetary cartography.
   The image orthorectification process is improved if a digital
   terrain model (DTM) is used.  The DTMs can be quite large and take some time to download.  They exist for
   many planetary bodies (e.g., the Moon, Mars, etc.). Therefore, there are options for selecting which DTMs to download
@@ -70,7 +171,6 @@ one time) may be useful depending on the complexity of your processing requireme
   the GitHub wiki page for the ISIS3 project:
  <ul>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Building-ISIS3-with-cmake#getting-started-with-github">Getting Started With GitHub</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Building-ISIS3-with-cmake#anaconda-and-isis3-dependencies">Installing Anaconda and satisfying ISIS 3 Dependencies</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Building-ISIS3-with-cmake#building-isis3">Building ISIS3 With cmake</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Building-ISIS3-with-cmake#new-environmental-variable-meanings">New ISIS3 environmental variables and their meanings</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Building-ISIS3-with-cmake#custom-data-and-test-data-directories">Custom data and test directories</a></li>
@@ -81,33 +181,27 @@ one time) may be useful depending on the complexity of your processing requireme
  </ul>
</p>

<h3>Links for Developers</h3>

  <ul>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Developer-Checklists">ISIS 3 Developer Checklist</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Jenkins-CI">Jenkins Continuous Integration Testing</a></li>
    <li><a href="https://github.com/USGS-Astrogeology/ISIS3/wiki/Managing-Custom-ISIS-Dependencies-(WIP)">Managing Custom ISIS 3 Dependencies</a></li>
  </ul>

<h3>Full ISIS3 Data Download</h3>

<p>
    If you have the disk space and network speed, you may want to download all of the ISIS data areas which
    includes all missions supported by ISIS.   This takes over 130 GB of disk space!  If you only have a 10 Mbps
    network connection it will take nearly two days to download.  If you want to acquire only certain mission data
     <a href="#MissionSpecific">click here</a>.   To download all ISIS 3 data files continue reading.
    Mission data is hosted on rsync servers and not through conda channels like the ISIS3 distribution.
    This requires using the rsync command from within a terminal window within your Unix distribution, or
    from within WSL if running Windows 10.   Downloading all mission data requires over 130 GB of disk space.
    If you want to acquire only certain mission data <a href="#MissionSpecific">click here</a>.
    To download all ISIS3 data files, continue reading.
</p>
<p>
    Remember to use the following command from the same directory you ran the previous rsync
    command. In the example it was "/work1/isis3".
    To download all ISIS3 data (approximately 180 GB), enter the following commands at the command prompt:

</p>
      <pre>      
      cd $ISIS3DATA
      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data .
      </pre>
<p>
 Note:  The above command downloads all ISIS data including the required base data area and all of the optional mission
 data areas.  After completing this step, skip to the <a href="#UnixEnvironment">Unix Environment Setup</a>.  If you chose
 not to download everything at once then continue below.
 data areas.
</p>


@@ -177,8 +271,6 @@ one time) may be useful depending on the complexity of your processing requireme
        <pre>
        rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/cassini data/
        </pre>


        <A NAME="ChandrayaanMission"> </A>
<p>
  Chandrayaan Mission (kernels can be excluded):
@@ -384,20 +476,11 @@ one time) may be useful depending on the complexity of your processing requireme

<h3>How do I install ISIS3.5.2 or earlier?</h3>
    <p>
         If you are looking for a version of ISIS3 prior to 3.5.3, please
         If you are looking for a version of ISIS3 prior to 3.6.0, please
        <a href="../../documents/LegacyInstallGuide/index.html">refer to the Legacy ISIS3 Installation
        Guide</a> for instructions on downloading and installing ISIS3, version 3.5.2 or earlier.
        Guide</a> for instructions on downloading and installing ISIS3, versions prior to 3.6.0.
    </p>

<A NAME="UnixEnvironment"> </A>

    <h2>UNIX Environment Setup</h2>
    <p>
        Still working on this part...
    </p>



      </body>

      <type>HTML</type>
@@ -418,7 +501,7 @@ one time) may be useful depending on the complexity of your processing requireme

  <history>
    <change name="Kristin Berry" date="2018-08-28">Original Version</change>
    <change name ="Tyler Wilson" date="2018-09-26">Added links to installation instructions on the ISIS3 GitHub Wiki</change>
    <change name ="Tyler Wilson along with the ASC Development Team" date="2018-09-26">Updated version to incorporate installation through Conda</change>
  </history>


@@ -427,9 +510,9 @@ one time) may be useful depending on the complexity of your processing requireme
    <brief>Downloading and installing ISIS3</brief>
    <description>
      This document describes how to download/compile and install a
      binary version of ISIS 3.
      binary version of ISIS3 as well
    </description>
    <author>Kristin Berry</author>
    <author>ASC Development Team</author>
    <date>2018-08-28</date>
  </bibliography>
</documentation>