-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update VM #5
Update VM #5
Changes from all commits
6cc80d8
07a1866
cc02ae0
14170cb
0a55da2
629dc71
7486d55
ea1aed9
7b78fd9
cbc2931
78e3ac3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#!/bin/bash | ||
|
||
EFS_ID="fs-d1824199" | ||
EFS_ID="fs-3609f37f" | ||
|
||
#----------------------------- | ||
# EFS | ||
# https://console.aws.amazon.com/efs/home?region=us-east-1#/filesystems | ||
#----------------------------- | ||
|
||
sudo apt-get install -y nfs-common | ||
|
||
sudo mkdir ~/efs | ||
|
||
sudo chown ubuntu ~/efs/ | ||
|
||
echo "sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).${EFS_ID}.efs.us-east-1.amazonaws.com:/ ~/efs" >> ~/.bashrc |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
sleep 90 | ||
|
||
sudo apt-get update | ||
|
||
sudo apt-get upgrade -y |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,56 +2,105 @@ | |
|
||
#----------------------------- | ||
# Python | ||
#----------------------------- | ||
|
||
sudo apt-get install -y \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need any of these now, but we should grab |
||
python \ | ||
python-dev \ | ||
python-pip \ | ||
python-setuptools | ||
|
||
#----------------------------- | ||
# pyenv | ||
# https://github.com/yyuu/pyenv | ||
#----------------------------- | ||
sudo easy_install pip | ||
|
||
mkdir -p ~/work/software/archives | ||
|
||
cd ~/work/software/archives | ||
|
||
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that there is |
||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | ||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc | ||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bethac07 said: This system [I am working with] had a I think you may run into the same issue here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (solution is just to keep putting everything into |
||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | ||
|
||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile | ||
|
||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | ||
|
||
# In a non-interactive install, you can't do this: | ||
# exec "$SHELL" | ||
# and so you need to mock this: | ||
|
||
export PYENV_ROOT="$HOME/.pyenv" | ||
|
||
export PATH="$PYENV_ROOT/bin:$PATH" | ||
|
||
eval "$(pyenv init -)" | ||
|
||
pyenv install 3.5.1 | ||
pyenv install 2.7.12 | ||
pyenv install 3.8.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likely want to do at least the most up-to-date 3.8 build |
||
|
||
pyenv shell 3.8.2 | ||
|
||
pyenv shell 3.5.1 | ||
pip install --upgrade pip | ||
pip install --upgrade setuptools | ||
pip install IPython pyyaml | ||
pip install --upgrade \ | ||
pip \ | ||
setuptools \ | ||
wheel | ||
|
||
pyenv shell 2.7.12 | ||
pip install --upgrade pip | ||
pip install --upgrade setuptools | ||
pip install IPython==5.0 | ||
pip install pyyaml | ||
#----------------------------- | ||
# pe2loaddata | ||
#----------------------------- | ||
|
||
# DCP and cytominer are now configured within this script because | ||
# This section will go once pe2loaddata is packaged | ||
|
||
pip install --upgrade \ | ||
IPython \ | ||
pyyaml | ||
|
||
#----------------------------- | ||
# NOTE: | ||
# DCP and cytominer are configured within this script because | ||
# pyenv wouldn't load when they were moved into their own scripts | ||
#----------------------------- | ||
|
||
#----------------------------- | ||
# DCP | ||
# DCP Control Node | ||
# https://github.com/CellProfiler/Distributed-CellProfiler/wiki/Before-you-get-started%3A-setting-up | ||
#----------------------------- | ||
cd | ||
|
||
# This is done in tools.sh | ||
# sudo apt install build-essential checkinstall | ||
# sudo apt-get install parallel | ||
|
||
# This is done above | ||
# sudo apt install python python-dev python-setuptools python-dev build-essential | ||
# pip install --upgrade setuptools | ||
|
||
# This is no longer needed | ||
# See https://pip.pypa.io/en/stable/installing/ | ||
# sudo easy_install pip | ||
|
||
sudo apt-get install -y \ | ||
cloud-image-utils \ | ||
fabric | ||
Comment on lines
+82
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can delete all of this |
||
|
||
cd ~ | ||
|
||
git clone https://github.com/CellProfiler/Distributed-CellProfiler.git | ||
|
||
cd Distributed-CellProfiler/files | ||
pyenv local 2.7.12 | ||
pyenv shell 2.7.12 | ||
|
||
pyenv local 3.8.2 | ||
|
||
pyenv shell 3.8.2 | ||
|
||
pip install -r requirements.txt | ||
|
||
#optional packages to be able to run ancillary DCP functions | ||
sudo apt-get install -y cloud-image-utils parallel python-pandas | ||
pip install --upgrade \ | ||
awscli | ||
|
||
#----------------------------- | ||
# cytominer | ||
#----------------------------- | ||
pyenv shell 3.5.1 | ||
pip install --upgrade pip | ||
pip install git+git://github.com/cytomining/cytominer-database.git | ||
pip install IPython | ||
|
||
Rscript -e 'devtools::install_github("cytomining/cytominer", dependencies=TRUE)' | ||
pip install cytominer-database==0.3.3 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# IAM role that allows access to S3 bucket | ||
S3_ROLE="ec2-iam-role-s3" | ||
S3_ROLE="s3-imaging-platform-role" | ||
|
||
# Name of S3 bucket to be mounted | ||
BUCKET_ID="imaging-platform-dev" | ||
BUCKET_ID="imaging-platform" | ||
|
||
#----------------------------- | ||
# s3fs | ||
# https://github.com/s3fs-fuse/s3fs-fuse | ||
#----------------------------- | ||
sudo apt-get install -y automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config | ||
sudo apt-get install -y \ | ||
automake \ | ||
autotools-dev \ | ||
g++ \ | ||
git \ | ||
libcurl4-gnutls-dev \ | ||
libfuse-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
make \ | ||
pkg-config | ||
|
||
mkdir -p ~/work/software/archives | ||
|
||
cd ~/work/software/archives | ||
|
||
git clone https://github.com/s3fs-fuse/s3fs-fuse.git | ||
|
||
cd s3fs-fuse | ||
|
||
./autogen.sh | ||
./configure | ||
|
||
./configure --prefix=/usr --with-openssl | ||
|
||
make | ||
|
||
sudo make install | ||
|
||
cd ~ | ||
|
||
mkdir ~/bucket | ||
|
||
echo "${BUCKET_ID} /home/ubuntu/bucket fuse.s3fs _netdev,allow_other,iam_role=${S3_ROLE},uid=1000,gid=1000,umask=0022 0 0" | sudo tee --append /etc/fstab | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may want to, rather than setting the IAM role up front, use |
||
|
||
sudo mount -a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider 20.04?