callahantiff / PheKnowLator

PheKnowLator: Heterogeneous Biomedical Knowledge Graphs and Benchmarks Constructed Under Alternative Semantic Models
https://github.com/callahantiff/PheKnowLator/wiki
Apache License 2.0
159 stars 29 forks source link

TODO: Publish Docker to Docker Hub #43

Closed callahantiff closed 3 years ago

callahantiff commented 4 years ago

Publish Docker to Docker Hub, when creating v2.0.0 release.

callahantiff commented 4 years ago

Update README for how to use project Docker. Good examples from @bill-baumgartner included below:

https://github.com/UCDenver-ccp/craft-shared-tasks/wiki/Concept-Annotation-Task-Evaluation

https://github.com/UCDenver-ccp/craft-shared-tasks/wiki/Building-the-CRAFT-evaluation-Docker-container

callahantiff commented 4 years ago

@bill-baumgartner - I am drafting the content that we will ultimately add to the README for utilizing Docker. I thought I would run it by you here. Would you mind taking a look at let me know what you think?

Notes



Docker

In order to utilize the Dockerized version of the code, please make sure that you have downloaded the newest version of Docker. There are two ways to utilize Docker with this repository:

Build the Container
To build the PheKnowLator Docker container:

cd /path/to/PheKnowLator (Note, this is the directory containing the Dockerfile file)
docker build -t pkt:[VERSION] .

Running the Container
The following code can be used to run PheKnowLator from outside of the container (after obtaining a prebuilt container or after building the container locally):

docker run --name pkt_example --rm -ti -v /local/path/to/PheKnowLator/resources/knowledge_graphs/:/PheKnowLator/resources/knowledge_graphs/ pkt:2.0.0 --app subclass --kg full --nde yes --rel yes --owl no --kgm yes

NOTES:


bill-baumgartner commented 4 years ago

Looks good. I have three comments: 1) There is a missing dot at the end of the docker build command, it should be: docker build -t pkt:[VERSION] . 2) The docker run command can work from any directory so "run the following code from the project root (i.e. PheKnowLator/):" is not necessary, and may not be possible if the user doesn't download the PheKnowLator code. 3) I think the Dockerfile needs to be changed at this point such that it doesn't download the code from GitHub, but instead uses the COPY command to import into the container. This way, any local changes to the code will be automatically imported. I think this is the expected behavior and may lead to confusion if we are instead pulling in the code from GitHub each time.

callahantiff commented 4 years ago

Looks good. I have three comments:

  1. There is a missing dot at the end of the docker build command, it should be: docker build -t pkt:[VERSION] .
  2. The docker run command can work from any directory so "run the following code from the project root (i.e. PheKnowLator/):" is not necessary, and may not be possible if the user doesn't download the PheKnowLator code.
  3. I think the Dockerfile needs to be changed at this point such that it doesn't download the code from GitHub, but instead uses the COPY command to import into the container. This way, any local changes to the code will be automatically imported. I think this is the expected behavior and may lead to confusion if we are instead pulling in the code from GitHub each time.

Thanks @bill-baumgartner! I have fixed the first two points and will work on the third. I need to think about what assumptions we will impose when utilizing the COPY approach. I will put it on the list for our meeting tomorrow.

callahantiff commented 3 years ago

TASK

Task Type: INFRASTRUCTURE Publish Docker container to DockerHub

TODO

Questions: