Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[Fix] Check package installation before running OSS script (#124)

Gayathriaeda78bfedcc
diff --git a/README.md b/README.md
index 7161526f8..37b9c2df6 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,8 @@ Use LLMs to eliminate manual processes involving unstructured data.
## System Requirements
- `docker` (see [instructions](https://docs.docker.com/engine/install/))
+- `docker compose` (see [instructions](https://docs.docker.com/compose/))
+- `python3`
- `git`
- `pdm` (see below)
- `pyenv` (recommended to manage multiple Python versions)
diff --git a/run-platform.sh b/run-platform.sh
index 55956b544..2f21dddd5 100755
--- a/run-platform.sh
+++ b/run-platform.sh
@@ -106,6 +106,23 @@ parse_args() {
debug "OPTION version: $opt_version"
}
+check_required_packages() {
+ echo "Checking if the required packages are installed..."
+ if ! command -v docker &> /dev/null; then
+ echo "$red_text""docker not found. Please install it and try again.""$default_text"
+ exit 1
+ fi
+ if ! (command -v docker compose &> /dev/null && command -v docker-compose &> /dev/null); then
+ echo "$red_text""docker compose not found. Please install it and try again.""$default_text"
+ exit 1
+ fi
+ if ! command -v python3 &> /dev/null; then
+ echo "$red_text""python3 not found. Please install it and try again.""$default_text"
+ exit 1
+ fi
+
+}
+
setup_env() {
# Generate Fernet Key. Refer https://pypi.org/project/cryptography/. for both backend and platform-service.
ENCRYPTION_KEY=$(python3 -c "import secrets, base64; print(base64.urlsafe_b64encode(secrets.token_bytes(32)).decode())")
@@ -200,10 +217,7 @@ run_services() {
#
# Run Unstract platform - BEGIN
#
-if ! command -v docker compose &> /dev/null; then
- echo "$red_text""docker compose not found. Please install it and try again.""$default_text"
- exit 1
-fi
+check_required_packages
opt_only_env=false
opt_only_pull=false