This commit is contained in:
llm
2025-11-22 19:37:35 +01:00
parent c200fa75ab
commit 2798963b0d
2 changed files with 5 additions and 3 deletions

View File

View File

@@ -22,7 +22,9 @@ AI_MODELS_DIR="$BIND_DIR/ai-models"
PYTHON_APPS_DIR="$BIND_DIR/python-apps"
USER_SYSTEMD_DIR="$HOME/.config/systemd/user"
CONTAINERFILE="$BIND_DIR/containerfile"
PY_APP="$PYTHON_APPS_DIR/colnomic-embed-multimodal-7b.py"
PY_APP="$PYTHON_APPS_DIR/embed-multimodal-7b.py"
echo "$PY_APP"
# Prepare directories
mkdir -p "$AI_MODELS_DIR" "$PYTHON_APPS_DIR" "$USER_SYSTEMD_DIR"
@@ -102,7 +104,7 @@ podman run -d --name "$CTR_NAME" --pod "$POD_NAME" \
-v "$AI_MODELS_DIR":/models \
-v "$PYTHON_APPS_DIR":/python-apps \
"$CUSTOM_IMAGE" \
python "$PY_APP"
python /python-apps/embed-multimodal-7b.py
# Wait for API readiness (/health)
HEALTH_URL="http://$HOST_LOCAL_IP:$PYTORCH_HOST_PORT/health"
@@ -171,7 +173,7 @@ if ! printf '%s' "$HEALTH_JSON" | grep -q '"status":"ok"'; then
fi
# Python API /embed
EMBED_URL="http://$HOST_LOCAL_IP:$PYTORCH_HOST_PORT/embed"
EMBED_URL="http://$HOST_LOCAL_IP:$PYTORCH_HOST_PORT/embed-texts"
EMBED_JSON="$(curl -fsS -X POST "$EMBED_URL" \
-H "Content-Type: application/json" \
-d '{"texts":["hello world from colnomic"]}')"