-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Set up Python packaging #17
Conversation
Hello @akx , |
@benjaminaubin Cool - let me know if you have any questions. |
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.
@akx thank you for this. Tested your branch, the package installed properly from the hatch wheel.
Could you
- add in the documentation a section
Packaging
with commandspip install hatch
hatch build .
andpip3 install xxxx.whl
- add
**.pyc
to gitignore - [Optional] split requirements in train / inference as suggested
@benjaminaubin Thank you 🙌
|
Looks great to me. |
@benjaminaubin Awesome, thanks! Can you take a look at #44? It's a requirement for being able to split requirements. |
How to install it? |
* Sort .gitignore; add dist and *.py[cod] * Use pyproject.toml + Hatch instead of setup.py Sibling of Stability-AI/stablediffusion#269 * Add packaging documentation
* Sort .gitignore; add dist and *.py[cod] * Use pyproject.toml + Hatch instead of setup.py Sibling of Stability-AI/stablediffusion#269 * Add packaging documentation
Sibling of Stability-AI/stablediffusion#269 but for the new fancy repo (and congrats on shipping)!
This makes it possible to build a standard Python
.whl
from the repo and use it instead of having to e.g. clone the entire repository.Features
__version__
tosgm/
(copying 0.0.1 fromsetup.py
)hatch
(removing the defunctsetup.py
)configs/
gets packaged assgm/configs
when using a packaged versionsgm.get_configs_path()
to make it easy for downstream users to find the configs pathCaveats
requirements*
files are a bit messy), but I would recommend an approach where inference and training requirements are strictly separated, and training reqs would be installed with optional requirements.The package seems to be installable and the configs are correctly shipped: