Spaces:
Build error
Build error
File size: 1,108 Bytes
46ac5e1 7e1cf81 61af5c2 7e1cf81 61af5c2 7e1cf81 46ac5e1 7e1cf81 46ac5e1 7e1cf81 b129f96 7e1cf81 46ac5e1 7e1cf81 46ac5e1 7e1cf81 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | FROM n8nio/runners:latest
USER root
# 1. Install system build tools (Alpine)
RUN apk add --no-cache make g++ python3-dev
# 2. Install Python libraries using the built-in 'uv' (Official n8n way)
# We target the existing venv in the image
RUN uv pip install --no-cache pandas numpy requests beautifulsoup4
# 3. Install JS libraries using the built-in 'pnpm'
# We must use the specific directory defined in the base image
WORKDIR /opt/runners/task-runner-javascript
RUN pnpm add lodash axios
# 4. Copy your custom config (Ensure this is in your HF repo)
WORKDIR /home/runner
COPY n8n-task-runners.json /etc/n8n-task-runners.json
# 5. Connection Settings for HF Spaces
# IMPORTANT: N8N_RUNNERS_TASK_BROKER_URI must point to your Main Space
ENV N8N_RUNNERS_AUTH_TOKEN=test \
N8N_RUNNERS_TASK_BROKER_URI=https://your-user-n8n-main.hf.space \
N8N_RUNNERS_CONFIG_FILE=/etc/n8n-task-runners.json
# Switch back to the runner user (UID 1000)
USER runner
# Use the official launcher to start both JS and Python
ENTRYPOINT ["tini", "--", "/usr/local/bin/task-runner-launcher"]
CMD ["javascript", "python"] |