-
Notifications
You must be signed in to change notification settings - Fork 23
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
added dockerfile #177
added dockerfile #177
Conversation
build a docker container that ships the latest pip-installable version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we integrate this into the CI, we need to switch to installing rapids-singlecell from the tag created on github rather than installing the latest version from pypi.
This means we need to modify the environment yaml file accordingly within the CI job
for more information, see https://pre-commit.ci
that way, the final container will be much smaller and faster to build. Enabling rebuilding the container on every repository push. We could then also run the tests inside the container if we want. The deps container only needs to be rebuilt if the dependencies changed. We should also rebuild the deps container for every release, so that the dependencies in the release container are up to date.
also fixed some bugs
apt-get dist-upgrade -y fixes above mentioned errors during unit tests test_clustering.py and test_emdedding_density.py
cleaner build log
The docker rapids-singlecell-deps and rapids-singlecell docker images work for me (you can get them from the docker hub and test if they work for you) They also work via singularity and all tests succeeded on our cluster. I also tried apptainer v1.2.3 but that did not work on our cluster (not sure if that is a problem of apptainer itself or specific to the installation on our cluster) This is as far as I can get with the CI. I guess the next steps would be:
In principle, publishing to docker hub is optional, since the github container registry should work as well (just need to add ghcr.io/ when pulling the docker container). However, people will look at docker hub first. Also, the docker hub account is free. So I would recommend also publishing to docker hub. |
o.k. I got the docker pipeline to work for pull requests. I changed the workflow so that the built images are not uploaded to the container registry for pull requests. I think this is sensible and it avoids permission problems. For releases, the images should be uploaded to the github container registry (ghcr.io). This should not cause permission problems, since releases are triggered by someone with write permission to the repo. However, I have no way of testing this (but I will be happy to help with debugging in case of problems). No Idea why the GPU-CI fails, but that should be unrelated to this PR. |
The CI is failing because its not running. I need to set a label for it to run. |
Now we’re no longer testing if pushing works right? |
Yes, you are right. This is as far as I can get with the permissions I have. Pushing to the github container registry will work using the GITHUB_TOKEN, if the token permissions are set to permissive and if the action was not triggered by a public fork. Since this is a pull request from a public fork, we will not be able to test pushing to the github container registry from this pull request. This is the reason, why I don't think it makes a lot of sense to push to the container registry from pull requests. Testing pushing to the registry is only really necessary when you want to test/debug the github action (like we are at the moment). I recommend the following approach in order to test pushing to the container registry:
An alternative would be to set up a token specifically for access to the container registry. But in that case, I would recommend to push to the docker registry instead, since the needed steps are very similar and then you have the image on docker hub, where more people will be able to find it. |
I see now! Yeah, that makes sense, what do you think @Intron7? |
I think this is a great idea. I can merge now if you are ok with it @flying-sheep |
build a docker container that ships the latest pip-installable version