Coder Social home page Coder Social logo

Comments (10)

almarklein avatar almarklein commented on May 1, 2024

Hi @Zulko! What'd be the use-case? Would these users like to use their native installed ffmpeg binary?

Would it suffice to prevent downloading via an environment variable? That should be easy to fix.

from imageio.

Zulko avatar Zulko commented on May 1, 2024

Thanks ! Actually using a native ffmpeg binary is not a problem (I think imageio doesn't overwrite the native ffmpeg). I think it's more to be sure that nothing (ffmpeg or anything else) gets automatically downloaded on the server. Automatic dowloads can be unwelcome for safety or security reasons I guess.

from imageio.

almarklein avatar almarklein commented on May 1, 2024

Ok, I understand. So do you think (or could you ask) whether disabling it via an environment variable would do the trick?

from imageio.

Zulko avatar Zulko commented on May 1, 2024

Ah sorry I didn't answer that. Yes an environment variable would do the trick.

from imageio.

drufat avatar drufat commented on May 1, 2024

I have ffmpeg installed on my computer but imageio still complains that it cannot find it and proceeds to download its own copy.

Also is it really considered a good practice to download binaries from the internet without the user's explicit permission? I see two major problems with this:

  1. Polluting the user's home directory with additional files is not a good practice. Typically it is expected that pip uninstall should leave the system in its original state without any residues, but in this case the downloaded files will never be cleaned up.
  2. Downloading executable code could be a serious security vulnerability especially if there is a probabiliyty that the server where that code is hosted becomes compromised. Third party binaries like ffmpeg should always be downloaded from trusted repositories, and not from custom self-hosted ones.

If you insist on downloading the binaries, I would suggest you do it during the setup.py install stage when the user has granted permission for the package to be installed and it is expected that files will be written, and not during the import stage of a module when the user doesn't expect any major side effects.

from imageio.

almarklein avatar almarklein commented on May 1, 2024

@drufat Yes, I won't argue it's ideal, though not uncommon for apps to download stuff automatically to the home dir (e.g. I believe Chrome updates itself in a similar way). Installing everything during installation solves some of the issues, but then imageio becomes a huge package for someone who just wants to read a jpg ...

from imageio.

almarklein avatar almarklein commented on May 1, 2024

Actually, such an environment variable already exists: IMAGEIO_NO_INTERNET

from imageio.

almarklein avatar almarklein commented on May 1, 2024

I think we need some documentation on environment variables.

from imageio.

almarklein avatar almarklein commented on May 1, 2024

Fixed in #86

from imageio.

Zulko avatar Zulko commented on May 1, 2024

Thanks !

from imageio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.