diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7b7073f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +.idea +*.pyc +__pycache__ +resources +out +logs +.git diff --git a/.gitignore b/.gitignore index 02eb4f9..1b4fc3c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ resources out +logs diff --git a/README.md b/README.md index 75005a1..bfb131c 100644 --- a/README.md +++ b/README.md @@ -1007,4 +1007,59 @@ Presence of `entities` and `relations` keys is controlled via respective query p ``` 1. Build image with command `docker build . -t derek-container-name` 1. Run container `docker run -p 80:5000 -d derek-container-name`. This command binds host's port 80 to container's port 5000, change it if you wish. -1. Now you can send requests for server available on 80'th port. \ No newline at end of file +1. Now you can send requests for server available on 80'th port. + +#### How to run experiments on remote host using Ansible and Docker + +We provide some Ansible scripts and Dockerfiles for easy experiment deployment on remote or local host. + +Expected experiment pipeline: +1. Prepare `/resources` folder with experiment required resources on your local machine +1. Upload code and resources to host machine +1. Build docker image and run container with experiment on host machine +1. Wait until experiment is over... +1. Fetch results to local machine + +To run scripts your host must support Docker and your localhost must support Ansible. Also your host user must be in sudoers (required by Docker). +To use GPUs for experiments your host platform must be supported by [NVIDIA](https://nvidia.github.io/nvidia-docker/) and has CUDA 10 supported driver (>= 410.48) installed. + +Firstly you have to prepare [Inventory ansible hosts file](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html) to use scripts. + +All scripts are executed by following template from src path: +```bash +ansible-playbook -i ansible/