This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 632dbaf
Showing
9 changed files
with
412,045 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Preliminary commands to build the EC2 box and install drivers | ||
# Assumes Ubuntu 16.04 | ||
sudo apt-get install python-pip | ||
sudo pip install plotly | ||
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb | ||
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb | ||
sudo apt-get update | ||
sudo apt-get install cuda | ||
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' | ||
sudo apt-get update | ||
sudo apt-get install docker-engine nvidia-modprobe | ||
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.0-rc.3/nvidia-docker_1.0.0.rc.3-1_amd64.deb | ||
sudo dpkg -i /tmp/nvidia-docker*.deb | ||
sudo nvidia-docker run -it harvardnlp/opennmt:8.0 . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#aws ec2 start-instances --instance-ids i-73ad3de6 --region us-west-2 | ||
HOSTNAME=$(aws ec2 describe-instances --instance-ids i-73ad3de6 --region us-west-2 | grep PublicIpAddress | awk -F ":" '{print $2}' | sed 's/[", ]//g') | ||
echo $HOSTNAME; | ||
echo ubuntu@$HOSTNAME | ||
ssh -o "StrictHostKeyChecking no" -i viz.pem ubuntu@$HOSTNAME 'export DATE=$(date "+%Y-%m-%d-%H-%M");cd OpenNMT-Regression;bash setup.sh;sudo nvidia-docker exec -i opennmt bash -c "$(cat run.sh)" | tee "call_log_$DATE.txt";cat "call_log_$DATE.txt" | python graph.py; git add "call_log_$DATE.txt"; git commit -a -m .; git push origin master;exit' | ||
aws ec2 stop-instances --instance-ids i-73ad3de6 --region us-west-2 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Command to login to ec2 and start job. | ||
BOX=i-73ad3de6 | ||
KEY=viz.pem | ||
aws ec2 start-instances --instance-ids $BOX --region us-west-2 | ||
HOSTNAME=$(aws ec2 describe-instances --instance-ids $BOX --region us-west-2 | grep PublicIpAddress | awk -F ":" '{print $2}' | sed 's/[", ]//g') | ||
echo $HOSTNAME; | ||
echo ubuntu@$HOSTNAME | ||
ssh -o "StrictHostKeyChecking no" -i $KEY ubuntu@$HOSTNAME 'export DATE=$(date "+%Y-%m-%d-%H-%M");cd OpenNMT-Regression;bash setup.sh;sudo nvidia-docker exec -i opennmt bash -c "$(cat run.sh)" | tee "call_log_$DATE.txt";cat "call_log_$DATE.txt" | python graph.py; git add "call_log_$DATE.txt"; git commit -a -m .; git push origin master;exit' | ||
aws ec2 stop-instances --instance-ids $BOX --region us-west-2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Commands run in the raw docker container. | ||
git clone "http://github.com/opennmt/opennmt" && cd opennmt && th preprocess.lua -train_src_file ../../de-train-clean.200K.txt -train_targ_file ../../en-train-clean.200K.txt -valid_src_file ../../de-val-clean.10K.txt -valid_targ_file ../../en-val-clean.10K.txt -output_file data/demo && th train.lua -data data/demo-train.t7 -save_file demo-model -gpuid 1 -print_every 50 -epochs 8 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Commands to setup docker container and push data | ||
sudo docker kill opennmt | ||
sudo docker rm opennmt | ||
sudo nvidia-docker run --name opennmt -d harvardnlp/opennmt:8.0 tail -f /dev/null | ||
sudo docker cp data/de-val-clean.10K.txt opennmt:/root/de-val-clean.10K.txt | ||
sudo docker cp data/en-val-clean.10K.txt opennmt:/root/en-val-clean.10K.txt | ||
sudo docker cp data/de-train-clean.200K.txt opennmt:/root/de-train-clean.200K.txt | ||
sudo docker cp data/en-train-clean.200K.txt opennmt:/root/en-train-clean.200K.txt |