Closed callahantiff closed 3 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
@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
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:
/local/path/to/PheKnowLator/resources/knowledge_graphs
references a directory that is not encrypted Running the pkt Library
section for more information on the parameters that can be passed to PheKnowLator.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.
Looks good. I have three comments:
- There is a missing dot at the end of the docker build command, it should be:
docker build -t pkt:[VERSION] .
- 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.- 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.
Task Type: INFRASTRUCTURE
Publish Docker container to DockerHub
Questions:
Publish Docker to Docker Hub, when creating v2.0.0 release.