somratpro commited on
Commit
82a08ca
·
1 Parent(s): e347e3b

feat: install python3-venv and automatically initialize a local virtual environment for n8n in start script

Browse files
Files changed (3) hide show
  1. .env.example +0 -1
  2. Dockerfile +1 -0
  3. start.sh +6 -1
.env.example CHANGED
@@ -33,7 +33,6 @@ PUBLIC_PORT=7861
33
 
34
  # Disable unnecessary services
35
  N8N_PYTHON_NODES_ENABLED=false
36
- N8N_RUNNERS_MODE=external
37
  N8N_LICENSE_AUTO_RENEW_ENABLED=false
38
 
39
  # -----------------------------------------------------------------------------
 
33
 
34
  # Disable unnecessary services
35
  N8N_PYTHON_NODES_ENABLED=false
 
36
  N8N_LICENSE_AUTO_RENEW_ENABLED=false
37
 
38
  # -----------------------------------------------------------------------------
Dockerfile CHANGED
@@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
14
  jq \
15
  python3 \
16
  python3-pip \
 
17
  sqlite3 \
18
  tini \
19
  && pip3 install --no-cache-dir --break-system-packages huggingface_hub \
 
14
  jq \
15
  python3 \
16
  python3-pip \
17
+ python3-venv \
18
  sqlite3 \
19
  tini \
20
  && pip3 install --no-cache-dir --break-system-packages huggingface_hub \
start.sh CHANGED
@@ -35,9 +35,14 @@ export TZ="${TZ:-$GENERIC_TIMEZONE}"
35
 
36
  # Disable noisy or unnecessary services
37
  export N8N_PYTHON_NODES_ENABLED="${N8N_PYTHON_NODES_ENABLED:-false}"
38
- export N8N_RUNNERS_MODE="${N8N_RUNNERS_MODE:-external}"
39
  export N8N_LICENSE_AUTO_RENEW_ENABLED="${N8N_LICENSE_AUTO_RENEW_ENABLED:-false}"
40
 
 
 
 
 
 
 
41
  # n8n v2 uses built-in user management.
42
 
43
  echo ""
 
35
 
36
  # Disable noisy or unnecessary services
37
  export N8N_PYTHON_NODES_ENABLED="${N8N_PYTHON_NODES_ENABLED:-false}"
 
38
  export N8N_LICENSE_AUTO_RENEW_ENABLED="${N8N_LICENSE_AUTO_RENEW_ENABLED:-false}"
39
 
40
+ # Silences the "Python task runner missing venv" warning by ensuring a venv exists
41
+ if [ ! -d "$N8N_HOME/python_venv" ]; then
42
+ echo "Initializing minimal Python venv for n8n compatibility..."
43
+ python3 -m venv "$N8N_HOME/python_venv"
44
+ fi
45
+
46
  # n8n v2 uses built-in user management.
47
 
48
  echo ""