Skip to content

Setup of rdt server on docker

anandRIyer edited this page Oct 15, 2019 · 13 revisions

Welcome to the rdt-reader wiki!

How to setup rdt server on docker:

Pre-requisite: Use an Ubuntu machine and make sure docker is installed.

  1. We recommend using Ubuntu machine and an Ubuntu docker for this setup. Please use Python 3.6 for this. (can be done by doing: apt install python3.6).
  2. Create a folder /home/rdtreader/.
  3. Download the git repository: https://github.com/DigitalHealthIntegration/rdt-reader.git
  4. Execute the script DockerBuild in the folder: /home/rdtreader/rdt-reader/. This sets up the docker image required for the setup: iprd-rdt-reader.
  5. Now, we need to start an instance of this docker image. Do: docker run -it -d -p 9000:9000 iprd-rdt-reader /bin/bash
  6. Verify that the docker container is up and running by doing: docker ps. (If you do not see this container listed, pls do: docker ps -a to see if it crashed)
  7. Now, we need to run various commands within the docker container itself.
  8. For that, do: docker exec -u 0 -it /bin/bash. We can obtain the docker container id by running docker ps.
  9. You should now be logged in to the docker container instance as root user.
  10. Now clone the git repository as follows: git clone --recurse-submodules https://github.com/DigitalHealthIntegration/rdt-reader.git
  11. Check if the env variable MINICONDA is set: echo $MINICONDA. If not, please set it. There is a miniconda3 folder in the root directory: /miniconda3/bin/conda. Ex: set MINICONDA /home/rdtreader/miniconda3/bin/conda or export $MINICONDA /home/rdtreader/miniconda3/bin/conda
  12. Now run conda activate.
  13. Copy the contents of tensorflow-yolov3-models/models sub folder in tensorflow-yolov3/
  14. We now need to update some configurations. For this, go to: /rdt-reader/tensorflow-yolov3/core and open config.py
  15. Here, update D:/source/repos to /home/rdtreader (or whichever folder you have in your setup)
  16. Now, go to the rdt-reader folder and run: python3 flasker.py

Possible errors and resolution:

  1. on dockers, we saw part of the clone (mentioned in step 10) fail with the following error: Encountered 1 file(s) that should have been pointers, but weren’t . This happens while trying to open \rdt_reader\rdt-reader\dataset\obj.tar.gz

Solution: If this happens, check if LFS has been initialized. Run: git lfs status to check its status and git lfs install to initialize it. As a workaround, if nothing works, just unzip the above file manually. This may need manually executing some steps later on.

  1. Sometimes, due to errors while cloning the git repository, we may see issues in the tensorflow-yolov3 folder. Ex: in tensorflow-yolov3-models/models/Flu_audere/1 folder, we should see a file saved_model.pb which should be about 900 KB. If less than that, it probably indicates there was an issue.

Solution: Please download the following files: https://drive.google.com/drive/u/0/folders/1mKZWs4f0DvjgrwUp4wBRcr1QMYfASyBM Extract the contents of these zip files to the following folders: Flu_audere.zip: /rdt-reader/tensorflow-yolov3-models/models/Flu_audere/1 Flu_audere_line.zip: /rdt-reader/tensorflow-yolov3-models/models/Flu_audere_line/1 After this, make sure you copy the contents of tensorflow-yolov3-models/models sub folder in tensorflow-yolov3/.

Clone this wiki locally