harvard-lts / fits

File Information Tool Set
http://fitstool.org
GNU Lesser General Public License v2.1
91 stars 46 forks source link

Add mediainfo and libmediainfo-dev to Dockerfile for FITS #391

Closed nakamura196 closed 7 months ago

nakamura196 commented 7 months ago

Resolves Issue: (link)

What does this Pull Request do?

This Pull Request adds the mediainfo and libmediainfo-dev packages to the Dockerfile used for building the FITS Docker image. This addition resolves the error 'Unable to load library 'mediainfo'' which was encountered when running FITS in a Docker container. The inclusion of these packages ensures that FITS can properly utilize the mediainfo library for media file analysis, enhancing its functionality within the Dockerized environment.

How should this be tested?

To test this Pull Request:

  1. Build the Docker image using the updated Dockerfile: docker build -f Dockerfile -t fits .
  2. Run FITS on a sample file in the Docker container: docker run --rm -v pwd:/work fits -i sample_file.txt
  3. Observe that the 'Unable to load library 'mediainfo'' error does not occur and that FITS successfully analyzes the media file.
  4. (Optional) Compare the output with previous runs of FITS to ensure consistency.

Test coverage

No: The changes in this pull-request are not covered by unit tests or integration tests. The change is specific to the Docker build process and can be verified through the steps mentioned in the testing section.

Interested parties

N/A

nakamura196 commented 7 months ago

It has been observed that the issue with 'Unable to load library 'mediainfo'' occurs specifically in the Mac M1 environment.

pwinckles commented 7 months ago

@nakamura196 Thanks for the MR. This should currently work on M1. Please try doing the following, without these changes:

mvn generate-resources
mvn -DskipTests clean package
docker build -f docker/Dockerfile -t fits .
nakamura196 commented 7 months ago

Thank you for the the guidance. Tools like mediainfo were successfully installed as part of the build process. Your assistance is greatly appreciated.