Last active
March 17, 2020 19:37
-
-
Save sshleifer/5bc41792a06a966238a53f34ad3fee85 to your computer and use it in GitHub Desktop.
GCP Setup Instructions
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
#!/usr/bin/env bash | |
#Make an instance here | |
# https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning?_ga=2.50258406.1502354465.1584473811-759161763.1583556304 | |
# dont enable jupyterlab | |
# Note that if you work at curai, this is moved to https://github.com/curai/experiments/blob/master/shleifer/gcp_setup.md | |
# Follow these instructions until the start of the "First-time setup script" section | |
# https://github.com/cs231n/gcloud/ | |
# From Local Machine | |
gcloud compute scp --recurse ~/.ssh [NAME]@INSTANCE:/home/[NAME] --project $PROJECT | |
# Should also copy dotfiles, e.g. | |
gcloud compute scp ~/.zshrc [NAME]@INSTANCE:/home/[NAME] --project $PROJECT | |
# if want .vim | |
gcloud compute scp --recurse ~/.vim [NAME]@INSTANCE:/home/[NAME] --project $PROJECT | |
gcloud compute --project $PROJECT ssh --zone "us-west1-b" INSTANCE | |
# From remote machine | |
sudo apt-get update | |
sudo apt-get -y install apt-fast | |
sudo apt install tmux htop zsh tree vim | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
nvidia-smi | |
tmux a | |
conda create --name nb --clone base | |
conda activate nb | |
conda install -y notebook=5.0.0 | |
# setup conda? | |
# Need --user for pip installs | |
pip install easydict funcy ipdb twilio --user | |
pip install tqdm eli5 fire jupyterthemes lightgbm --user | |
pip install gensim google_compute_engine fuzzywuzzy textblob durbango --user | |
# Below Doesnt always work | |
pip install jupyter_contrib_nbextensions --user | |
jupyter contrib nbextension install --user | |
jupyter nbextension enable codefolding/main | |
vim ~/.jupyter/jupyter_notebook_config.py | |
# Paste the following (you need to type :set paste then i the cmd-v) | |
""" | |
c = get_config() | |
c.NotebookApp.ip = '0.0.0.0' | |
c.NotebookApp.open_browser = False | |
c.NotebookApp.port =8888 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment