Last active
November 9, 2017 00:43
-
-
Save karino2/b1d85a0fa70887f5a89ee764f528f052 to your computer and use it in GitHub Desktop.
GCP Setup
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
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get install -y git python-pip | |
git config --global user.email "[email protected]" | |
git config --global user.name "Kazuma Arino" | |
git config --global core.editor "vi" | |
# setup cuda | |
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda -y | |
# install docker-ce: https://docs.docker.com/engine/installation/linux/docker-ce/debian/ | |
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get -y update | |
sudo apt-get -y install docker-ce | |
wget https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb | |
sudo dpkg -i nvidia-docker*.deb | |
# golang setup | |
wget https://storage.googleapis.com/golang/go1.8.4.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go1.8.4.linux-amd64.tar.gz | |
mkdir -p go/bin | |
mkdir -p ~/bin | |
echo 'export GOPATH=$HOME/go' >> .bashrc | |
echo 'PATH=$PATH:$HOME/bin:$GOPATH/bin:/usr/local/go/bin' >> .bashrc | |
echo 'alias ebserver="editbook --port 52698"' >> .bashrc | |
echo 'alias eb="editbook --client"' >> .bashrc | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$HOME/bin:$GOPATH/bin:/usr/local/go/bin | |
go get github.com/karino2/editbook | |
mkdir work | |
pushd work | |
git clone https://github.com/palantir/python-language-server.git | |
cd python-language-server | |
sudo pip install --process-dependency-links . | |
popd | |
cp go/src/github.com/karino2/editbook/lsconf.json ./ | |
curl https://beyondgrep.com/ack-2.18-single-file > ~/bin/ack | |
chmod 0755 ~/bin/ack | |
sudo usermod -a -G docker $USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment