Spaces:
Paused
Paused
Fix Dockerfile syntax error and update Vespa endpoint
Browse files- Dockerfile +16 -18
- hono-proxy/.env.backend-hf +1 -1
Dockerfile
CHANGED
|
@@ -42,24 +42,22 @@ COPY --chown=user vespa-certs/* $HOME/.vespa/il-infra.colpali-server.default/ ||
|
|
| 42 |
|
| 43 |
# Create startup script for backend services only
|
| 44 |
WORKDIR $HOME/app
|
| 45 |
-
RUN
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
kill $EMBED_PID
|
| 62 |
-
EOF
|
| 63 |
|
| 64 |
RUN chmod +x start-backend.sh
|
| 65 |
|
|
|
|
| 42 |
|
| 43 |
# Create startup script for backend services only
|
| 44 |
WORKDIR $HOME/app
|
| 45 |
+
RUN printf '#!/bin/bash\n\
|
| 46 |
+
\n\
|
| 47 |
+
# Start embedding API on port 8001\n\
|
| 48 |
+
echo "Starting ColPali embedding API on port 8001..."\n\
|
| 49 |
+
python embedding_api.py &\n\
|
| 50 |
+
EMBED_PID=$!\n\
|
| 51 |
+
\n\
|
| 52 |
+
# Wait for embedding API to be ready\n\
|
| 53 |
+
sleep 10\n\
|
| 54 |
+
\n\
|
| 55 |
+
# Start Hono proxy on HF Spaces port 7860\n\
|
| 56 |
+
echo "Starting Hono proxy on port 7860..."\n\
|
| 57 |
+
cd hono-proxy && PORT=7860 CORS_ORIGIN="*" EMBEDDING_API_URL="http://localhost:8001" VESPA_ENDPOINT="https://f5acf536.ed2ceb09.z.vespa-app.cloud" npx tsx src/index.ts\n\
|
| 58 |
+
\n\
|
| 59 |
+
# If Hono exits, kill embedding service\n\
|
| 60 |
+
kill $EMBED_PID\n' > start-backend.sh
|
|
|
|
|
|
|
| 61 |
|
| 62 |
RUN chmod +x start-backend.sh
|
| 63 |
|
hono-proxy/.env.backend-hf
CHANGED
|
@@ -9,7 +9,7 @@ NODE_ENV=production
|
|
| 9 |
CORS_ORIGIN=*
|
| 10 |
|
| 11 |
# Vespa Configuration
|
| 12 |
-
VESPA_ENDPOINT=https://
|
| 13 |
VESPA_CERT_PATH=/home/user/.vespa/il-infra.colpali-server.default
|
| 14 |
|
| 15 |
# Internal Services
|
|
|
|
| 9 |
CORS_ORIGIN=*
|
| 10 |
|
| 11 |
# Vespa Configuration
|
| 12 |
+
VESPA_ENDPOINT=https://f5acf536.ed2ceb09.z.vespa-app.cloud
|
| 13 |
VESPA_CERT_PATH=/home/user/.vespa/il-infra.colpali-server.default
|
| 14 |
|
| 15 |
# Internal Services
|