Upload 50 files
Browse files- Dockerfile +1 -10
- arabic_fonts_setup.sh +2 -2
- test_script.sh +2 -0
Dockerfile
CHANGED
|
@@ -65,16 +65,7 @@ RUN mkdir -p static
|
|
| 65 |
# Copy all remaining files
|
| 66 |
COPY . .
|
| 67 |
|
| 68 |
-
# Setup Arabic fonts using
|
| 69 |
-
# First try the shell script approach (for Hugging Face Spaces compatibility)
|
| 70 |
-
RUN if [ -f "arabic_fonts_setup.sh" ]; then \
|
| 71 |
-
chmod +x arabic_fonts_setup.sh && \
|
| 72 |
-
./arabic_fonts_setup.sh; \
|
| 73 |
-
else \
|
| 74 |
-
echo "arabic_fonts_setup.sh not found, skipping font setup"; \
|
| 75 |
-
fi
|
| 76 |
-
|
| 77 |
-
# Fallback to Python script approach if shell script fails or is not found
|
| 78 |
# Use /tmp for font installation to avoid permission issues
|
| 79 |
RUN sed -i 's|/usr/share/fonts/truetype|/tmp/fonts/truetype|g' setup_fonts.py && \
|
| 80 |
mkdir -p /tmp/fonts/truetype && \
|
|
|
|
| 65 |
# Copy all remaining files
|
| 66 |
COPY . .
|
| 67 |
|
| 68 |
+
# Setup additional Arabic fonts using Python script with proper permissions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
# Use /tmp for font installation to avoid permission issues
|
| 70 |
RUN sed -i 's|/usr/share/fonts/truetype|/tmp/fonts/truetype|g' setup_fonts.py && \
|
| 71 |
mkdir -p /tmp/fonts/truetype && \
|
arabic_fonts_setup.sh
CHANGED
|
@@ -34,8 +34,8 @@ fc-cache -fv
|
|
| 34 |
|
| 35 |
# Verify Arabic fonts installation
|
| 36 |
echo "✅ Verifying Arabic fonts installation..."
|
| 37 |
-
fc-list | grep -i "amiri
|
| 38 |
|
| 39 |
echo "🎯 Arabic fonts setup completed successfully!"
|
| 40 |
echo "Available Arabic fonts:"
|
| 41 |
-
fc-list | grep -i "arabic
|
|
|
|
| 34 |
|
| 35 |
# Verify Arabic fonts installation
|
| 36 |
echo "✅ Verifying Arabic fonts installation..."
|
| 37 |
+
fc-list | grep -i "amiri\|scheherazade\|noto.*arabic" | head -10
|
| 38 |
|
| 39 |
echo "🎯 Arabic fonts setup completed successfully!"
|
| 40 |
echo "Available Arabic fonts:"
|
| 41 |
+
fc-list | grep -i "arabic\|amiri\|scheherazade" | cut -d: -f2 | sort | uniq
|
test_script.sh
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
echo "Test script executed successfully!"
|