-
Notifications
You must be signed in to change notification settings - Fork 22
packaged ptychography software (frontend + backend) #486
Conversation
Thanks @leofang. Did you try to build it locally with Also, is https://github.com/leofang/ptycho_gui the private repo you are talking about? I think I can access it. You probably meant your personal repo. I checked the structure of the project briefly, and it seems it won't install as the setup.py is missing. You can consider https://github.com/NSLS-II/scientific-python-cookiecutter to prepare a proper structure of the project to make it pip-installable. |
Yes, I did
Sorry I don't understand the reason for using a Docker image, @mrakitin could you please explain?
The project has two parts: a frontend (a GUI) which is https://github.com/leofang/ptycho_gui as you noticed, and a backend (CPU+GPU codes) which is hosted in private mode https://github.com/leofang/ptycho --- I don't think you could access this! The backend is set to be a Ah, I see the confusion. The Thanks! |
so that we can control the underlying enviroment that the package is built against. One of the more annoying things that can happen is you build a package on your (up-to-date) laptop and then it will not run on the machines on the floor because the binaries are linked against a newer version of libc than is available on the floor. |
@leofang, thanks for elaborating on the private repo, now I understand. Yes, as @tacaswell explained, we want a reproducible environment, which is provided by the docker images mentioned above. Just run a container as:
and you will have a fresh environment for conda build. Clone the repo, switch to your branch, and built the package as you did. |
Great, thanks @mrakitin @tacaswell. I built the package on |
I've followed @mrakitin's instruction to build with docker and it worked after a few slight changes in The only thing left before making all these work is to mirror the backend to the internal GitLab server so that the builder can access it, but I don't know how to do this. |
@mrakitin the backend has been moved to internal GitLab, and a local build was successful. However, during building I still need to type my GitLab id and pw because the repo's visibility is set to "internal". Any idea to get around this without making the repo public? |
@leofang, do you have a GitLab token? Maybe we can use it to authenticate and clone the code from your private repo? |
I saw that page too. But I think our internal GitLab is not on the latest version, so it lacks many features including deploy tokens. This is what I see in Settings->Repository. |
I took some time to investigate, and my understanding is
So, my new question is: is it unsafe to store the ssh key pair from |
Great job on investigating the options! It is save to store .pub part of the ssh key pair, but never the private pair. What we do for other tokens is passing them via env variables to the Docker container when we start it. That way we don't have to worry about storing them in the Docker image. If you want to use the ssh pair, we can mount it if the secret dir exists on our building server (e.g., |
Could you clarify this? What you want to mount? What is to be put in the |
If you place your public/secret keys somewhere on
We can do something similar with your keys. As this package is very special, for now I think we will be fine with accepting a built package from you, which can be put to our local channel on |
specifying attrs version is mainly for resolving the dep correctly
@mrakitin I gave up ssh for a number of reasons that we can discuss offline. Now I switch back to personal access tokens in f8878ad. The key insight is that I tested in docker and it works, so we're only one step away: Is it possible to set an environmental variable named
OK. This will be the last resort. Let me know what you think. Thanks! |
Great progress, @leofang! The problem now is that freyja will push every built package to our public channel; we don't have the machinery not to push (yet). I think it will need some preparation before we can proceed. On the package side, we may need some flag to mark the package as "private". |
Ah, that's right. We discussed this long ago on Slack. Glad we're finally here! I suppose this could be a good summer project? 😆 So for the time being let's use the last resort. I think when you manually place the package to the local channel, it won't be uploaded, right? |
Our building approach will be significantly reworked. I guess freyja will only be needed for such corner cases.
Correct, the mirroring only happens in one direction: https://anaconda.org/lightsource2-tag/ --> alexandria. |
Here is a summary about gitlab ssh access: https://3.basecamp.com/3733838/buckets/4534819/messages/1693665280. |
Just leaving a note for myself when I return to this PR in the near future. Resolving the CUDA dependency issue for Conda packages is still challenging. One of the reasons is that currently For this particular package, in this branch I've resolved the GPU & CuPy issues at the |
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.
I suggest we put the recipe into a separate folder, such as recipes-manual
or recipes-private
. This way they won't be attempted to build on freyja, but we still could have a recipe to build manually. Same may work for https://github.com/NSLS-II/playbooks/issues/278.
|
Yes please, let's do it. This way we may have subsequent PRs to that folder rather than keeping iterating in this single WIP PR. |
Done. Question: if this PR is merged now, would it trigger the builder (I hope not)? |
Thanks Leo. It won't trigger a build as it only tracks the changes in
and the building itself is happening here:
|
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.
Looks good in general. Left a couple of comments to simplify the structure a bit and about the private repo.
🍺 |
🍻 |
I finally packaged the ptychography code deployed at HXN and CSX. There're things to be discussed offline with @licode and perhaps @stuartcampbell before merging. Among those, the usage of
git submodule
, currently hosted in my private repo in order to avoid patent issues, may be an obstacle for the building system? Perhaps moving both repos (GUI and GPU code) to NSLS-II and allowing read-only access for the building agent is the best option? (We need to grant people from other nat'l labs read-only access anyway.)