Closed gasperpetelin closed 3 years ago
Gašper thanks for this suggestion. It's been in the back of my mind for a while but I haven't acted on it. If you're willing to create the required code your contribution will be much appreciated! So that I understand the workflow correctly, I should create a Dockerhub account and connect it to GitHub AFTER accepting your pull request?
Yes, ideally it should be done after the pull request since there is still no Dockerfile in the repo and Dockerhub has no template for building. I am not that familiar with Github/Dockerhub integration but I think the following should hopefully work.
/^v([0-9.]+)$/
matches how versions will be created in the future. If release versions are tagged paprica_v0.7.0
then /^paprica_v([0-9.]+)$/
might is required.)
This should create 2 things. First is a new container with tag latest
. This will rebuild the container on every new master commit. If a new user downloads a container it will be the default one. The second thing is a more permanent container versioning system. On every new release tagged paprica_v{number}
, a container with a specific version version-{number}
will be created. This way someone can download a container that matches releases on Github. Hopefully, this works. If not the regular expression can be easily fixed later.
I will try to create a good Dockerfile
based on linux_install.sh
. It might not be the best and most efficient one but it can be improved in the future. The current one takes about 2 min to build and produces an image with a size of 1-1.5GB.
Just last node: Free Dockerhub account has some limitations. Image building might take some time to start if no free resources are available. But I have never experienced long waiting times. Usualy image building starts 5-10 minutes after commit.
Sounds good. We'll give it a go!
Alright, I haven't gotten around to actually testing the image but the automated builds seem to be working. Thanks for contributing the docker file! If you try the image before I do let me know how it goes.
Since I am not familiar with the majority of the features of paprica my test should be taken with a grain of salt. It appears that everything works with Docker and Singularity. Containerized ./paprica-run.sh test bacteria
produces the same results as a non-containerized application.
I only have 2 more short questions but otherwise, this issue can be closed I think:
.py
and .sh
scripts are nonexecutable and chmod a+x *py && chmod a+x *sh
is required? Couldn't these scripts be made executable on Gitlab and users would not have to run the command?I'll made that change to README and will update shortly. File permissions is a problem that I haven't solved yet. There's no security reason this is the case, I just haven't been able to get the permissions to persist. It's clear how to do this from the Git command line but for convenience I usually push commits from GitHub Desktop. Let me know if you know of a solution!
Greetings
I was wondering if there is any plan to include support for Docker/Singularity? Publishing a Docker image would probably simplify the
paprica
installation for many users and eliminate the need to manually fix incompatible dependencies. It would also help with reproducibility and simplify the use on systems where installing packages is not always possible (shared research clusters that support Singularity). If adding Docker support would be useful I can create a pull request that will add the required code?Setup
While I am not really familiar with the whole library, adding Docker support should hopefully be fairly simple. It requires a new file named
Dockerfile
with roughly the following content (this is just a first draft of theDockerfile
. It is based on thelinux_install.sh
script):The second step is then building and publishing the image. This requires a project maintainer to create a Dockerhub account and connecting it with Github (approximately 2-5 min of work). After that Docker image is built automatically on every new commit and requires no further actions and is thus very low maintenance.
Advantages
test.fasta
in/path/to/fasta/data