Build Fixes Summary
Problem Identified
The Docker build was failing with:
E: Unable to locate package fonts-scheherazade-new
Root Cause
The package fonts-scheherazade-new is not available in Ubuntu 22.04 (jammy), it's only available in Ubuntu 24.04 (noble) and later versions.
Solution Implemented
- Fixed Package Name: Changed
fonts-scheherazade-newtofonts-scheherazadewhich is the correct package name for Ubuntu 22.04 - Updated Cairo Font URL: Changed to a more reliable source for Cairo font installation
- Maintained Compatibility: Kept Ubuntu 22.04 as the base image to ensure compatibility with Hugging Face Spaces
Changes Made
Dockerfile
- Replaced
fonts-scheherazade-newwithfonts-scheherazade - Kept all other packages and configuration the same
- Maintained Java-disabling environment variables
- Preserved unoconv installation for fallback conversion
app.py
- Updated Cairo font URL to a more reliable source
- Kept all other Java-disabling logic and fallback mechanisms
Expected Results
These changes should resolve the build error and allow the Docker image to build successfully while maintaining all the Java-disabling and fallback conversion features.
Verification Steps
- Rebuild the Docker image
- Verify the image builds without errors
- Test document conversion to ensure all functionality works
- Check that Java is properly disabled
- Verify font installation works correctly
Additional Notes
- The
fonts-scheherazadepackage provides the Scheherazade font which is suitable for Arabic text rendering - The fallback mechanisms for conversion (LibreOffice → unoconv) remain in place
- All Java-disabling features are preserved
- Font installation improvements should provide better Arabic text support