Emergency management tweet filter environment
1.2K
Docker container with Python 3.5, Pytorch, NVIDIA drivers, and the Amazon Web Services command line interface.
This also contains some API libraries (tweepy, botometer), NLP libraries (NLTK, fastText, and gensim), and a library to handle excel spreadsheets (xlrd).
Also, a handy library for live-plotting loss curves (livelossplot)
This image requires that the NVIDIA drivers and nvidia-docker are installed on the host machine. To run, the image and interface with the Jupyter Notebook:
nvidia-docker run -it -p 8888:8888 --hostname localhost earthlab/em-tweet-filter
You can then view the Jupyter Notebook by opening http://localhost:8888 in your web browser.
When trying to run this image from a newly launched EC2 instance, there is a host of problems which I did not find immediately intuitive. The following aims to help with those problems - primarily for me when I encounter them in the future, however feel free to request assistance.
Also: make sure your EC2 instance has 8888 port access
Note: The following are meant to be run in order (i.e. Set up -> To fix nvidia problems -> to reinstall docker...)
Also note: this is all expected to be run with the earthlab-nvidia-docker Amazon Machine Image (AMI)
sudo susudo apt-get upgrade (sometimes this seems to fail for no apparent reason, try repeating)sudo apt-get purge nvidia*sudo add-apt-repository ppa:graphics-driverssudo apt-get install nvidia-384sudo rebootnvidia-smiHuge thanks to: http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux
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 updateapt-cache policy docker-cesudo apt-get install -y docker-ceHuge thanks to: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
Nvidia-docker gets removed in the above steps, so this is adding it back
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -fsudo apt-get purge -y nvidia-docker (it's okay if this can't locate nvidia-docker)curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ sudo apt-key add -distribution=$(. /etc/os-release;echo $ID$VERSION_ID)curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ sudo tee /etc/apt/sources.list.d/nvidia-docker.listsudo apt-get updatesudo apt-get install -y nvidia-docker2sudo pkill -SIGHUP dockerdHuge thanks to: https://github.com/NVIDIA/nvidia-docker#ubuntu-distributions
And now you should be able to run nvidia-docker run -it -p 8888:8888 earthlab/em-tweet-filter!
The p3-instance process is much simpler. This docker image can be sucessfully used by only:
nvidia-docker run -it -p 8888:8888 earthlab/em-tweet-filter) from within the instancepip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp35-cp35m-linux_x86_64.whlContent type
Image
Digest
Size
2.8 GB
Last updated
over 6 years ago
docker pull earthlab/em-tweet-filter