Closed JackyZzZz closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.89%. Comparing base (
d931154
) to head (d2d2937
). Report is 6 commits behind head on main.
@FanwangM I noticed the workflow failed during docker build stage. It looks like there were some problem after we bump the python version to 3.11. I fixed it with using the convention of 3.11 of pep517
and it was able to run with no problem. Could you try to run it again when you are available?
Also, I think it might be beneficial if you can set up the dockerhub and HuggingFace credential in the repo's secrets. Otherwise the workflow will not work because it depends on the secrets of the repo, which our official repo haven't set up yet.
There was also 2 places I would appreciate your opinion too. Could you let me know if it's okay for me to use these approches:
https://github.com/theochem/Selector/pull/212#discussion_r1645328396
https://github.com/theochem/Selector/pull/212#discussion_r1645332640
For now, I think we can focus on the web app itself and then we will deal with the docker image later. We can just comment on the related part. We may end up hosting the docker images with GitHub Packages
.https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages.
Can you update the codes based on https://huggingface.co/spaces/QCDevs/selector? Thanks for the hard work. @JackyZzZz
Hi @FanwangM, thank you for the comment!
That makes sense since this way the user can stay on our Github page to get the docker image without going to another site. I will also take a look at how to make this work too basides working on other interfaces. We can discuss this in our next meeting too since it looks like there are somewhat more setup for publishing images on Github.
I will update the workflow to push it to our official space. However, I noticed that the space you created is a streamlit
space. Could you update this to a docker
space maybe? I think streamlit space are for simpler apps so that the space will be looking for that app.py
in the root of the folder to build the application. In our case it will be a package with our streamlit code in streamlit_app
folder. So a docker space will use the Dockerfile
we have in the root of our repo to start the interface application in a docker container where our package resides, which is also the space I've been using for testing.
Also, could you set the HF_TOKEN
secret in the setting of our repo. This is required so that the workflow have appropriate permission to push to the HuggingFace. You can generate the token from HuggingFace and paste it in Github secrets.
Let me know if there is any questions~
Hi @FanwangM, thank you for the comment!
That makes sense since this way the user can stay on our Github page to get the docker image without going to another site. I will also take a look at how to make this work too basides working on other interfaces. We can discuss this in our next meeting too since it looks like there are somewhat more setup for publishing images on Github.
I will update the workflow to push it to our official space. However, I noticed that the space you created is a
streamlit
space. Could you update this to adocker
space maybe? I think streamlit space are for simpler apps so that the space will be looking for thatapp.py
in the root of the folder to build the application. In our case it will be a package with our streamlit code instreamlit_app
folder. So a docker space will use theDockerfile
we have in the root of our repo to start the interface application in a docker container where our package resides, which is also the space I've been using for testing.Also, could you set the
HF_TOKEN
secret in the setting of our repo. This is required so that the workflow have appropriate permission to push to the HuggingFace. You can generate the token from HuggingFace and paste it in Github secrets.Let me know if there is any questions~
The space has been converted to a docker
space and the HF_TOKEN
secret is set up as well. Please lt me know if there is a problem. @JackyZzZz
Hi @FanwangM, I commented out the code in the workflow for building and pushing docker image. I also updated the command for pushing to HuggingFace. Could you run the workflow again to see if it works? I think it should work now.
Hi @FanwangM ,I figured that we should use HEAD
to represent the current branch where the pull request is on for pushing to the main branch on HuggingFace. This should fix the problem now hopefully. However, I am starting to think should we have like a middle layer for deployment testing? In the future, if other contributors make pull requests about the interface, I believe that we wouldn't want the changes to go live directly before it has been fully reviewed and tested. I can take a look into making it work as well once I finish all the interfaces.
Hi @FanwangM ,I figured that we should use
HEAD
to represent the current branch where the pull request is on for pushing to the main branch on HuggingFace. This should fix the problem now hopefully. However, I am starting to think should we have like a middle layer for deployment testing? In the future, if other contributors make pull requests about the interface, I believe that we wouldn't want the changes to go live directly before it has been fully reviewed and tested. I can take a look into making it work as well once I finish all the interfaces.
This is a good and important point! Thanks for bringing it up. We should have this on the to-do list.
Hi @FanwangM, I noticed the pushing to HuggingFace is still failing for some reason. Just curious, did you setup the HF_TOKEN
as the password of the account or the user access token
generated by HuggingFace. From the error message, it looks like it's setting up using the password right now, which is not supported anymore.
You can refer to this tutorial for how to generate the access token up if you haven't already. We also need to give all the necessary permissions to the token such as write access etc to allow our github action to be able to push.
Hi @FanwangM, I noticed the pushing to HuggingFace is still failing for some reason. Just curious, did you setup the
HF_TOKEN
as the password of the account or theuser access token
generated by HuggingFace. From the error message, it looks like it's setting up using the password right now, which is not supported anymore.You can refer to this tutorial for how to generate the access token up if you haven't already. We also need to give all the necessary permissions to the token such as write access etc to allow our github action to be able to push.
Thanks for checking this. But I did set up the HF_token
as the repo secret.
Did you successfully deployed the application from your end using your own HF account before?
Yes. I just deployed another version on my own space minutes ago. Did you set it up as HF_TOKEN
or HF_token
? I think it's also case-sensitive, so these two are not the same thing.
We have HF_TOKEN
.
This PR introduces the basic interfaces of our package, including the
intro
andMaxMin
page. Moreover, it established a complete CI/CD protocol to deploy the associated docker image toDockerHub
andHuggingFace
for deployment.The docker image is deployed on DockerHub.
The application is live on HuggingFace.
There are a few things that should be checked before merging:
Here is a demo of this PR:
https://github.com/theochem/Selector/assets/110846941/5fa794ba-be86-4daf-92aa-7dedcd61240c