Skip to content

Instantly share code, notes, and snippets.

@benkamphaus
Last active October 9, 2021 05:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save benkamphaus/1ad4ef4a1052c2ebdefa to your computer and use it in GitHub Desktop.
Save benkamphaus/1ad4ef4a1052c2ebdefa to your computer and use it in GitHub Desktop.
try to get comfortable in a vanilla amazon linux instance
sudo yum install zsh tmux htop git -y
sudo yum install util-linux-user -y
sudo chsh -s /bin/zsh ec2-user
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
mkdir ~/src
mkdir ~/datomic
# from https://gist.github.com/sebsto/19b99f1fa1f32cae5d00
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
# OpenJDK, java 8
sudo amazon-linux-extras install java-openjdk11
sudo yum install java-1.8.0-openjdk
# clojure linux installer
curl -O https://download.clojure.org/install/linux-install-1.10.1.507.sh
chmod +x linux-install-1.10.1.507.sh
sudo ./linux-install-1.10.1.507.sh
# other packages enabled
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum update -y
sudo yum install docker -y
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo yum install python34-virtualenv
sudo alternatives --set python /usr/bin/python3.4
sudo easy_install --upgrade six
sudo yum install python-pip python-dev
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc0-cp34-cp34m-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL
pip install --upgrade pip
# for some reason pip path in bash config got got borked:
hash -r
# scipy needs root permission to pip install and sudo `pip` resolution is moody
sudo /usr/local/bin/pip install git+https://github.com/fchollet/keras.git
sudo /usr/local/bin/pip install sklearn pillow ipython h5py pandas
# obtain cudnn and copy it over, put config in shell resource file
# cudnn-7.5-linux-x64-v5.1.tgz -- this may not have been necessary actually
tar zxf cudnn-7.5-linux-x64-v5.1.tgz
cd cuda
sudo cp lib64/* /usr/local/cuda/lib64/
sudo cp include/cudnn.h /usr/local/cuda/include/
# tensorflow needs this path info to find cuda libs
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" >> ~/.zshrc
echo "export CUDA_HOME=/usr/local/cuda" >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment