@@ -83,22 +83,27 @@ RUN ollama serve & \
8383 pkill ollama || true
8484
8585# Pre-download Tika JAR and ensure it's in the expected location
86- RUN python3 -c "\
87- import os, shutil; \
88- from tika import parser, tika; \
89- # Trigger download \
90- parser.from_buffer(b'test', xmlContent=False); \
91- # Get the actual JAR path \
92- jar_path = getattr(tika, 'TikaJarPath', None); \
93- print(f'Tika JAR downloaded to: {jar_path}'); \
94- # Copy to expected location if different \
95- if jar_path and os.path.exists(jar_path) and jar_path != '/tmp/tika-server.jar': \
96- shutil.copy2(jar_path, '/tmp/tika-server.jar'); \
97- print('Copied to /tmp/tika-server.jar'); \
98- # Verify \
99- assert os.path.exists('/tmp/tika-server.jar'), 'Tika JAR not found at /tmp/tika-server.jar'; \
100- print('Tika JAR verified at /tmp/tika-server.jar'); \
101- " || echo "WARNING: Tika JAR pre-download failed, will download at runtime"
86+ RUN python3 <<'PYEOF'
87+ import os
88+ import shutil
89+ from tika import parser, tika
90+
91+ # Trigger download
92+ parser.from_buffer(b'test', xmlContent=False)
93+
94+ # Get the actual JAR path
95+ jar_path = getattr(tika, 'TikaJarPath', None)
96+ print(f'Tika JAR downloaded to: {jar_path}')
97+
98+ # Copy to expected location if different
99+ if jar_path and os.path.exists(jar_path) and jar_path != '/tmp/tika-server.jar':
100+ shutil.copy2(jar_path, '/tmp/tika-server.jar')
101+ print('Copied to /tmp/tika-server.jar')
102+
103+ # Verify
104+ assert os.path.exists('/tmp/tika-server.jar'), 'Tika JAR not found at /tmp/tika-server.jar'
105+ print('Tika JAR verified at /tmp/tika-server.jar')
106+ PYEOF
102107
103108# Create data directory for Qdrant
104109RUN mkdir -p /data/qdrant
0 commit comments