diff --git a/.local/share/pytorch_pod/python-apps/embed-multimodal-7b.py b/.local/share/pytorch_pod/python-apps/embed-multimodal-7b.py old mode 100644 new mode 100755 diff --git a/bin/create_pod_pytorch.sh b/bin/create_pod_pytorch.sh index b3c57a3..a5ab44f 100755 --- a/bin/create_pod_pytorch.sh +++ b/bin/create_pod_pytorch.sh @@ -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"]}')"