magika icon indicating copy to clipboard operation
magika copied to clipboard

feat: Add magika docker file

Open Rhevin opened this issue 1 year ago • 5 comments

Add Docker file for Magika Python

Rhevin avatar Feb 18 '24 14:02 Rhevin

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Feb 18 '24 14:02 google-cla[bot]

Thanks for this contribution. This docker setup is valid, but it uses Magika from source.

That's more bleeding edge that we'd want - people using magika in docker are either looking to try it out in a clean way, or they want to use it in a more "production" environment. For that reason, I'd prefer the docker image to use published releases of the Python package. Something like this should be enough for that purpose:

FROM python:${PYTHON_VERSION}-slim
pip install magika
ENTRYPOINT ["magika"]

invernizzi avatar Feb 19 '24 18:02 invernizzi

Thanks for this contribution. This docker setup is valid, but it uses Magika from source.

That's more bleeding edge that we'd want - people using magika in docker are either looking to try it out in a clean way, or they want to use it in a more "production" environment. For that reason, I'd prefer the docker image to use published releases of the Python package. Something like this should be enough for that purpose:

FROM python:${PYTHON_VERSION}-slim
pip install magika
ENTRYPOINT ["magika"]

^ Agree, probably also adding an ENV for argument for passing the magika version

gaby avatar Feb 19 '24 18:02 gaby

Thanks for the feedback I will update this today

Rhevin avatar Feb 20 '24 06:02 Rhevin

updated

Rhevin avatar Feb 20 '24 16:02 Rhevin

Alright, merging as is, but FYI I'll then move this into the repo root; now that we install magika with pip install, there is no reason to put it in python/. Thanks!

reyammer avatar Feb 22 '24 16:02 reyammer