Skip to content

Commit

Permalink
Merge pull request #42 from ad12/feat/general
Browse files Browse the repository at this point in the history
Feat/general
  • Loading branch information
ad12 authored Jul 20, 2019
2 parents cde6faa + ec6e364 commit efbc618
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ An environment file `envs/dosma_env.yml` file is provided in this repo containin

To automatically install this environment (assumes Anaconda/Miniconda is installed):
1. Navigate to the DOSMA directory in the Terminal
2. Run `chmod +x initialize-dosma`
3. Run `./initialize-dosma`
2. Run `chmod +x setup`
3. Run `./setup`

### Weights
For pretrained weights for MSK knee segmentation, request access using this [Google form](https://goo.gl/forms/JlxgS3aoUeeUUlVh2). Note that these weights are optimized to run on single-echo RMS DESS sequence as used in the [OsteoArthritis Initiative (OAI)](https://oai.epi-ucsf.org/datarelease/).
Expand Down
29 changes: 23 additions & 6 deletions initialize-dosma → setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# Create virtual environment named (dosma_env) using conda
#
# @usage (from terminal/command line):
# ./initialize-dosma
# ./setup
#
# @initialization protocol:
# 1. Run "chmod +x create-env" from command-line (Linux) or Terminal (MacOS)
# 1. Navigate to DOSMA
# 1. Run "chmod +x setup" from command-line (Linux) or Terminal (MacOS)
#
# @author: Arjun Desai, Stanford University
# (c) Stanford University, 2018
Expand All @@ -15,6 +16,7 @@
# Check if conda exists
ANACONDA_KEYWORD="anaconda"
MINICONDA_KEYWORD="miniconda"
GOOGLE_FORM="https://forms.gle/sprthTC2swyt8dDb6"

hasAnaconda=0

Expand All @@ -29,7 +31,7 @@ then
echo "Miniconda found in path"
fi

if [ $hasAnaconda -eq 0 ]; then
if [[ $hasAnaconda -eq 0 ]]; then
echo "Anaconda/Miniconda not installed - install from https://www.anaconda.com/distribution/"
exit 125
fi
Expand All @@ -43,9 +45,24 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
env_file=`pwd`/envs/dosma_env.yml
else
echo "only Linux and MacOS are supported"
echo "Only Linux and MacOS are supported"
exit 125
fi

# create dosma_env
conda env create -f $env_file
# Create Anaconda environment (dosma_env)
if [[ -z `conda env list | grep dosma_env` ]]; then
conda env create -f $env_file
else
echo "Environment 'dosma_env' found. Run 'conda activate dosma_env' to get started."
fi

# Launch google form
if [[ "$OSTYPE" == "linux-gnu" ]]; then
xdg-open $GOOGLE_FORM
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
open $GOOGLE_FORM
else
echo "Only Linux and MacOS are supported"
exit 125
fi
19 changes: 0 additions & 19 deletions setup.py

This file was deleted.

0 comments on commit efbc618

Please sign in to comment.