Launch an AWS EC2 instance.
Install Miniconda:
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
bash Miniconda3-py38_4.10.3-Linux-x86_64.sh
Log out, log back in.
Create a conda environment called workplace
, install Python v3.8, pip, and Jupyter Notebook:
conda create -n workplace python=3.8 pip jupyter
Create a screen:
screen -S notebook
Activate the workplace
environment:
conda activate workplace
Create a SSL certificate:
mkdir ~/ssl && cd $_
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout "cert.key" -out "cert.pem" -batch
Generate a default Jupyter config file:
cd ~
jupyter notebook --generate-config
Create a password for Jupyter Notebook access:
jupyter notebook password
Launch Jupyter Notebook:
jupyter notebook --no-browser --port 8888 --ip 0.0.0.0 --certfile ~/ssl/cert.pem --keyfile ~/ssl/cert.key
CTRL + a + d
to detach from the screen.
Run the following to get the notebook URL and visit the URL from your local browser:
echo "https://`curl -s http://169.254.169.254/latest/meta-data/public-hostname`:8888"
Ignore the warning and proceed. Enter your password.