From 4d43f82f8f1a9dfa2f7550d20bcc152c13803798 Mon Sep 17 00:00:00 2001 From: Sheng Zha Date: Mon, 27 Jul 2020 20:21:00 -0700 Subject: [PATCH] add subversion/wget to docker, add readme (#1279) --- tools/batch/docker/Dockerfile | 2 ++ tools/batch/docker/README.md | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tools/batch/docker/README.md diff --git a/tools/batch/docker/Dockerfile b/tools/batch/docker/Dockerfile index d2868239b3..a9ef4aaad4 100644 --- a/tools/batch/docker/Dockerfile +++ b/tools/batch/docker/Dockerfile @@ -4,6 +4,8 @@ FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 build-essential \ locales \ cmake \ + wget \ + subversion \ git \ curl \ vim \ diff --git a/tools/batch/docker/README.md b/tools/batch/docker/README.md new file mode 100644 index 0000000000..80efb0d9d1 --- /dev/null +++ b/tools/batch/docker/README.md @@ -0,0 +1,22 @@ +# Updating the Docker for AWS Batch. + +Our current batch job dockers are in 747303060528.dkr.ecr.us-east-1.amazonaws.com/gluon-nlp-1. To +update the docker: +- update the Dockerfile +- Make sure docker and docker-compose, as well as the docker python package are installed. +- Export the AWS account credentials as environment variables +- CD to the same folder as the Dockerfile and execute the following: + +``` +# this executes a command that logs into ECR. +$(aws ecr get-login --no-include-email --region us-east-1) + +# builds the Dockerfile as gluon-nlp-1 docker. +docker build -t gluon-nlp-1 . + +# tags the recent build as gluon-nlp-1:latest, which AWS batch pulls from. +docker tag gluon-nlp-1:latest 747303060528.dkr.ecr.us-east-1.amazonaws.com/gluon-nlp-1:latest + +# pushes the change +docker push 747303060528.dkr.ecr.us-east-1.amazonaws.com/gluon-nlp-1:latest +```