This repository shows an example implementation of Udacity's Deep Learning Nanodegree project on RNNs. The idea here is that the RNN learns text from the Simpson show at 'Moe's Tavern' and from this new text can be generated. As the dataset is small, the text will be non-sensical, but the words as such make sense.
The below instructions will show how I setup the environment to run this project on an Amazon GPU. It is assumed that you already have an AWS Account.
- Sign in to Console. Then go to Services > EC2.
- Click on Launch Instance button.
- Choose Amazon Machine Image (AMI) by selecting AWS Marketplace: Search for Deep Learning AMI with Source Code (CUDA 8, Ubuntu) and select it.
- Choose an Instance Type (filter by GPU compute): Select p2.xlarge.
- Click on Review and Launch.
- Configure Security Groups.
- Generate .pem authentication key pair, if needed.
- Click Launch Instances and then View Instances to come to the EC2 Dashboard.
- When View Instances displays 2/2 checks passed under Status Checks, proceed to next step.
- Login to EC2 Instance:
ssh -i <your key name>.pem ubuntu@<IPv4 public IP address displayed on EC2 Dashboard>
- Clone the repository and navigate to the project folder:
git clone https://github.com/gro1m/simpsons_tv_script.git
cd simpsons_tv_script
- Install requirements from requirements.txt:
sudo python3 -m pip install -r requirements.txt
- Install cudnn:
- Download and untar cudnn version 6 for CUDA 8 (Copied from RISHAV KUMAR):
CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz" wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE} tar -xzvf ${CUDNN_TAR_FILE}
- Copy the files to appropriate locations and set the correct rights - see also NVIDIA Docs:
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
- Adjust cudnn library softlinks:
cd /usr/local/cuda/lib64 sudo ln -sf libcudnn.so.6 libcudnn.so sudo ln -sf libcudnn.so.6.0.21 libcudnn.so.6 sudo ldconfig
NOTE: I tried to use cudnn6.5(v2), but this led to an import error.
cd /home/ubuntu
jupyter notebook --ip=0.0.0.0 --no-browser
- Need token by jupyter notebook token, so copy everything starting with
:8888/?token
- Access jupyter notebook index from your web-browser by visiting:
<IPv4 public IP address displayed on EC2 Dashboard> :8888/?token=...
This project is licensed under the MIT License - see the LICENSE.txt file for details.
I acknowledge that this project is heavily based on the framework provided by Udacity on tv_script_generation.