With the addition of image-reading functions enabled by default in torchvision #1632 #1881 #1909, we will need to properly package libjpeg and libpng (and other libraries will be used soon as well, like ffmpeg) so that users of {Windows, Linux, OSX} x {pip, conda, source} can use those new functionalities in torchvision without issues.
I believe the current recommended way that PyTorch deals with 3rd-party libraries is the following:
conda-forge channel would bring problems due to conflicts with other libraries we use.We will also need to make sure our CI (which is fairly tied to binary builds) is updated.
cc @seemethere @rgommers
although I'm not sure if using the
conda-forgechannel would bring problems due to conflicts with other libraries we use.
It may right now I think, we really need to improve that situation. It would also force the users to mix channels. libpng is available in defaults. libjpeg-turbo is in defaults as well, but it looks outdated. Needs a more detailed look at what the best option is here.
for pip, I believe the preferred way is to include the libraries together with the torchvision wheel
@fmassa said that size of the wheels isn't critical, and just bundling in libpng and libjpeg should be fine for now. So using auditwheel (Linux) and delocate (macOS) seems like the way to go. There's no such tool for Windows, so there the right libs need to be copied in by hand.
@fmassa, is it possible to have assignment permissions on this repository?
@andfoy I gave you and @rgommers triage permissions to torchvision
@jjhelmus is it possible to update libjpeg-turbo to the latest version on the default channel in Anaconda? It seems that the current version (1.2.1) is older than the one found on conda-forge.
libjpeg-turbo is provided as a CDT in defaults not a standard package. CDT are packages which stand in for system installed libraries and therefore cannot be updated.
Most helpful comment
@andfoy I gave you and @rgommers triage permissions to torchvision