Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: using docker images #538

Conversation

sjspielman
Copy link
Member

Closes #496

This PR adds documentation for using Docker images. To start, I stayed fairly thin on details for how to use Docker in the first place, under the assumption that contributors who actually want to pull images and run in containers have a sense of what they're doing already. I included a note to this end, and I also added a couple more Docker resources (links from training materials).

Let me know if there are any particular details that I glossed over which you think I should mention and/or emphasize more. For example, should I say more about docker run flags or volumes?

One item that this PR does not cover but we should probably open an issue for is running docker images in LSfR, which may be necessary for certain modules depending on their compute needs. Do you agree we should circle back to this?

@sjspielman sjspielman requested a review from dvenprasad as a code owner June 24, 2024 17:15
@sjspielman sjspielman removed the request for review from dvenprasad June 24, 2024 17:15
@sjspielman sjspielman requested a review from allyhawkins as a code owner June 24, 2024 17:18
Copy link
Member

@allyhawkins allyhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I think this looks good. I'm on board with the level of detail, but I do think at least some minimal example of the docker run command would be helpful with notes that link you to the Docker docs so contributors can customize to their needs.

Also, I agree that using Docker on LSfR is something that can be added later. I may actually add that in the LSfR section rather than the Docker section and link to it from these pages.

docs/ensuring-repro/docker/using-images.md Show resolved Hide resolved
docs/ensuring-repro/docker/using-images.md Show resolved Hide resolved
docs/ensuring-repro/docker/using-images.md Outdated Show resolved Hide resolved
docs/ensuring-repro/docker/using-images.md Outdated Show resolved Hide resolved
Comment on lines 40 to 43
4. You can now use the image to run code from the analysis module using [the `docker run` command](https://docs.docker.com/reference/cli/docker/container/run/) from a terminal.
- The analysis module's `README.md` file should contain documentation for what command(s) you need to issue to [run the module](../../contributing-to-analyses/analysis-modules/running-a-module.md).
- You will also need to [mount a volume](https://docs.docker.com/storage/volumes/) as part of your command to ensure that the Docker container has access to all files needed, including any data files.
- Note that containers for [images based on `bioconductor/r-ver`](./docker-images.md#r-based-images) can also be run in the browser as interactive RStudio Server sessions, [as described in the Bioconductor documentation](https://www.bioconductor.org/help/docker/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it might make sense to show a minimal example of what running the image with mounting a volume looks like? I know we are assuming previous experience, but I do think it could be helpful to provide an example in one place. Something like:

docker run -it --mount type=bind,source="path to local files",target="path to container files" <module-name>:latest

If you have a different preferred way of running a container then we could use that too, but I think an example could be helpful.

@sjspielman
Copy link
Member Author

This should now be ready for another look! In addition to other responses to review, I've expanded the discussion of using docker run to cover more ground, and confirmed that the instructions I've written work for the pushed simulate-sce image.

@sjspielman sjspielman requested a review from allyhawkins June 26, 2024 13:56
Copy link
Member

@allyhawkins allyhawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

docs/ensuring-repro/docker/using-images.md Outdated Show resolved Hide resolved
docs/ensuring-repro/docker/using-images.md Outdated Show resolved Hide resolved
@sjspielman sjspielman merged commit 6818678 into AlexsLemonade:reproducibility-docs Jun 26, 2024
4 checks passed
@sjspielman sjspielman deleted the sjspielman/496-using-docker-images branch June 26, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants