Last active
April 27, 2018 22:01
-
-
Save eric-czech/e8a436c8a1f2e7993cbefa1eb9511fe9 to your computer and use it in GitHub Desktop.
Instructions for running [ops-experiments](https://github.com/imagej/ops-experiments) deconvolution on EC2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These instructions were used to create a CUDA 9.1 compatible EC2 instance for the sake of | |
# running experiments with [imagej-ops-experiments]([ops-experiment](https://github.com/imagej/ops-experiments) | |
# deconvolution algorithms (via YacuDecu) | |
# Step 1) Create Instance | |
# Start instance for image: https://aws.amazon.com/marketplace/pp/B07BFSMQ32 | |
# - Choose p2.xlarge type | |
# - Make sure to have at least 30G of disk space | |
# Step 2) Install Java/Maven | |
sudo apt-get install default-jdk | |
sudo apt-get install maven | |
# Step 3) Install CUDA Toolkit 9.1 | |
## From instructions to install CUDA Toolkit 9.1 (https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal) | |
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64 | |
mv cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64 cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda | |
cat <<EOF > ~/.bash_profile | |
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64\\ | |
\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}} | |
export PATH=/usr/local/cuda-9.1/bin\${PATH:+:\${PATH}} | |
EOF | |
source ~/.bash_profile | |
# Step 4) Clone ops-experiments and build | |
cd ~/; mkdir repos; cd repos; git clone https://github.com/imagej/ops-experiments | |
cd ~/repos/ops-experiments/ops-experiments-cuda | |
mvn install | |
# Step 5) Run the deconvolution test | |
mvn exec:java -Dexec.mainClass="net.imagej.ops.experiments.filter.deconvolve.InteractiveCudaDeconvolveTest" -P gpu 2>&1 | grep -i "total execution" | |
# > [INFO] Total execution time (decon) is: 2981 | |
# > [INFO] Total execution time cuda (decon+overhead) is: 10554 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment