Giter Club home page Giter Club logo

usgscsm's Introduction

CSM-CameraModel

ISD Specification: https://github.com/USGS-Astrogeology/pfeffernusse/blob/master/swagger.yaml

Setting up dependencies with conda (RECOMMENDED)

Install conda if you do not already have it.

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b

You can add a -p <install-prefix> to choose where to install miniconda. By default, it will install it to $HOME/miniconda3.

Setting up conda for bash

Copy and paste the following into a terminal running the bash shell:

echo -e "\n\n# Adding miniconda3 to PATH" >> $HOME/.bashrc && \
echo -e "export PATH=$HOME/miniconda3/bin:\$PATH" >> $HOME/.bashrc && \
source $HOME/.bashrc && \
which conda

For more information: bash installation

Setting up conda for tcsh

Copy and paste the following into a terminal running the tcsh shell:

echo  "\n\n# Setting up miniconda3 for tcsh" >> $HOME/.cshrc && \
echo  "source $HOME/miniconda3/etc/profile.d/conda.csh > /dev/null" >> $HOME/.cshrc && \
source $HOME/.cshrc && \
which conda

For more information: tcsh installation

Creating an isolated conda environment

Run the following commands to create a self-contained dev environment for CSM-CameraModel (type y to confirm creation):

conda create -n csmdev -c usgs-astrogeology cmake libcsm

For more information: conda environments

Activating the environment

After creating the csmdev environment and installing cmake and libcsm into it, we need to activate it. Right now, cmake, libcsm, and their dependencies are isolated to a conda environment and we need to tell conda that we want to use it. The activation command depends on your shell.

  • bash: source activate csmdev
  • tcsh: conda activate csmdev

You can add these to the end of your $HOME/.bashrc or $HOME/.cshrc if you want the csmdev environment to be active in every new terminal.

Building CSM-CameraModel

After you've set up conda, you can build CSM-CameraModel:

  1. Fork USGS-Astrogeology/CSM-CameraModel if you don't already have a fork.
  2. Clone your fork of CSM-CameraModel with --recursive option to get the gtest submodule.
git clone --recursive [email protected]:<your-username>/CSM-CameraModel.git
cd CSM-CameraModel
git remote add upstream [email protected]:USGS-Astrogeology/CSM-CameraModel.git
  1. Sync your fork with upstream and ensure the gtest submodule is init'd if your fork is old.
git pull upstream master
git submodule update --init --recursive
git push -u origin master
  1. mkdir build && cd build
  2. cmake .. && make
  3. ctest

Building without a package manager

To build:

  1. Install libcsmapi

    You can install this with an INSTDIR of your choice, or let it default (see libcsmapi README)

mkdir $HOME/csmenv
cd $HOME
git clone [email protected]:sminster/csm.git
cd csm
make -f Makefile.linux64 all install clean INSTDIR="$csmenv"
  1. Install cmake >= 3.10
cd $HOME
wget https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz
tar xzf cmake-3.12.0-Linux-x86_64.tar.gz
rsync -azv cmake-3.12.0-Linux-x86_64/ $HOME/csmenv/
echo -e "\n#Prepending csm env to path\nsetenv PATH "$HOME/csmenv/bin:$PATH" >> $HOME/.cshrc
source $HOME/.cshrc
  1. Fork and clone down this repo and its submodules (gtest)
git clone --recursive [email protected]:<username>/CSM-CameraModel.git
cd CSM-CameraModel
git remote add upstream [email protected]:USGS-Astrogeology/CSM-CameraModel.git
git pull upstream master
git submodule update --init --recursive
git push -u origin master
  1. mkdir build && cd build
  2. cmake -DCSM_INCLUDE_DIR="${csmenv}/include/csm -DCSM_LIBRARY="${csmenv}/lib/libcsmapi.so .. && make

usgscsm's People

Contributors

astrokew78 avatar jessemapel avatar jlaura avatar kberryusgs avatar makaylas avatar twilson271828 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.