Skip to content

Instantly share code, notes, and snippets.

@ericdill
Created May 14, 2020 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericdill/67835fda3a0e7b4c38f224d2199ce2ba to your computer and use it in GitHub Desktop.
Save ericdill/67835fda3a0e7b4c38f224d2199ce2ba to your computer and use it in GitHub Desktop.
getting started with conda on aws
# ssh to host
# download latest miniconda
wget bit.ly/get-miniconda
bash get-miniconda -b -p ~/miniconda
~/miniconda/bin/conda init bash
# exit shell
# ssh to host again
# install jupyter
conda create -n jupyter jupyter jupyterlab pandas numpy matplotlib holoviews
# Activate your new conda environment
conda activate jupyter
# create and edit your jupyter config so that you have a secure jupyter
# server with a password that you can connect to
jupyter notebook --generate-config
# should output the following:
# Writing default config to: /home/ubuntu/.jupyter/jupyter_notebook_config.py
# Create your notebook password in IPython:
from notebook.auth import passwd; passwd()
# it will prompt you to enter your password. Copy the output string into your config path
# Edit your config.py file and set the following parameters:
c.NotebookApp.port = 8888
c.NotebookApp.password = <output from ipython passwd() command>
c.NotebookApp.ip = '*'
# Launch your notebook server:
jupyter notebook
# or `jupyter lab` if you prefer
# Go to your web browser and enter the public FQDN of your server
# (should be the hostname you ssh'd to) and add :<port at the end>,
# so it should be something like this:
ec2-111-222-333-444.compute-1.amazonaws.com:8888
# Type your password into the jupyter password prompt -- this is the same
# password you typed into the IPython session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment