-
Notifications
You must be signed in to change notification settings - Fork 0
Setup of rdt server on docker
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.
- 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).
- Create a folder /home/rdtreader/.
- Download the git repository: https://github.com/DigitalHealthIntegration/rdt-reader.git
- Execute the script DockerBuild in the folder: /home/rdtreader/rdt-reader/. This sets up the docker image required for the setup: iprd-rdt-reader.
- Now, we need to start an instance of this docker image. Do: docker run -it -d -p 9000:9000 iprd-rdt-reader /bin/bash
- 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)
- Now, we need to run various commands within the docker container itself.
- For that, do: docker exec -u 0 -it /bin/bash. We can obtain the docker container id by running docker ps.
- You should now be logged in to the docker container instance as root user.
- Now clone the git repository as follows: git clone --recurse-submodules https://github.com/DigitalHealthIntegration/rdt-reader.git
- 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
- Now run conda activate.
- Copy the contents of tensorflow-yolov3-models/models sub folder in tensorflow-yolov3/
- We now need to update some configurations. For this, go to: /rdt-reader/tensorflow-yolov3/core and open config.py
- Here, update D:/source/repos to /home/rdtreader (or whichever folder you have in your setup)
- Now, go to the rdt-reader folder and run: python3 flasker.py
Possible errors and resolution:
- 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.
- 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/.