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

Add Dockerfile #135

Merged
merged 1 commit into from
May 20, 2024
Merged

Add Dockerfile #135

merged 1 commit into from
May 20, 2024

Conversation

alanhoyle
Copy link
Contributor

This adds a Dockerfile that builds a Docker image for bamrescue based on the most recent version available in the arkanosis apt repo.

This makes it much easier to install and use the program in circumstances where the user might have access to run containerized software, but might not be able to install software system-wide. A Docker image allows it to be run on many HPC or other hardware with Docker, Apptainer (neé Singularity), Podman, and other container hosts.

@Arkanosis
Copy link
Owner

Dear @alanhoyle ,

Thank you very much for this pull request!

I'll definitely merge it, but it seems I have two other things to do first:

  • provide a .deb of version 0.3.0 (I'm still providing 0.2.0 which is a shame — even though the most important features are already in 0.2.0);
  • most importantly, fix files ownership in that .deb file (as I was testing your Dockerfile, I realized that they are incorrect, which breaks apt-get -y install bamrescue at least on rootless podman).

That shouldn't take too long, and I'll merge this PR just after.

Thanks again!

@alanhoyle
Copy link
Contributor Author

alanhoyle commented May 18, 2024

Thanks!

I only tested it in Docker's native build environment.

Have you ever considered making this available through Conda?

Is there a way to know the file offset of any corrupted blocks in a file?

@Arkanosis
Copy link
Owner

Have you ever considered making this available through Conda?

I have not, because I don't use Conda myself. But I'm open to making bamrescue available to any “package manager”, as long as I'm able to test it myself.

Feel free to open an issue to request packaging for Conda. I've already thought about packaging as rpm (#10) and as flatpak / snap (#18), which I don't use either. Any information you can share there about how to do it (including PRs ;) ) will make it happen faster.

I just need to mention that I don't have Windows, so I'm very unlikely to provide Conda packages for Windows (the same applies to Winget, Chocolatey, Scoop…). If anyone was willing to provide Windows packages, though, I'd happily mention them somewhere, but with a note telling that I've not been able to test them.

Is there a way to know the file offset of corrupted blocks in a file is?

Not yet, but that's a feature I already wanted to add (#5). My reasoning was that if you know where corrupted blocks are and have a non-corrupted version of the entire file, you could transfer only the corrupted blocks instead of the whole file. I'm curious if that's what you had in mind, or if you think of another use for these offsets?

@Arkanosis Arkanosis merged commit 36e686f into Arkanosis:master May 20, 2024
@alanhoyle
Copy link
Contributor Author

My experience is that it's a rare bioinformatician who doesn't use Conda. I don't think that a pull request here would be the right way to get it in there: That would be made via a pull request on the Conda repo(s). I don't think it's too hard to do, but I've never done it myself.

As an aside, you could probably add a docker build to your CI/CD and push a fresh bamrescue image to DockerHub or quay.io with each release or tag....

@Arkanosis
Copy link
Owner

Dear @alanhoyle ,

First of all, this PR is merged :-) Thanks again! You might want to look at this change I've made after the merge, especially the replacement of “software stable” with “stable main”, because the old version won't work anymore with the updated apt repository. Everything else is just me being a nerd, and is not (yet) mandatory. Let me know if you experience any issue with the updated Dockerfile: I've only tested it with Podman so far.

Thanks for the hints for Conda. As you might have guessed, I'm more of a software developer than a bioinformatician myself. It seems anyone can host a Conda channel, so I'd have to do a PR on a channel most bioinformaticians use already. Do you guys use conda-forge? This one seems pretty popular.

As for hosting a pre-built OCI image somewhere, I'd like to do that, but I'm not yet quite sure where. I've used Docker Hub and Bintray in the past, I'll check Quay (I had never heard of it before), and I'm also considering self-hosting (though I'm afraid that would be way more expensive than hosting an APT repository).

@Arkanosis
Copy link
Owner

As for hosting a pre-built OCI image somewhere, I'd like to do that, but I'm not yet quite sure where.

FWIW, I've uploaded the current image at docker.io/arkanosis/bamrescue:latest, but I provide no guarantee whatsoever it's going to be there forever. Also, I've not yet found a way to sign images on DockerHub, so I've a little trust issue there.

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