# Install Node to Python image

### 1. Create a node installation bash file

In your git repository, create a new file called `install_node.sh` with the following content

```
install_node.sh
```

```bash
#!/bin/bash
set -e

# Update package lists and install curl
apt-get update && apt-get install -y curl

# Install Node.js and npm (Node.js v20)
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

# Upgrade npm to the latest version
npm install -g npm@latest

# Clean up to reduce image size
apt-get clean && rm -rf /var/lib/apt/lists/*

# Display installed versions
node --version
npm --version
```

### 2. Edit build command on seenode platform

For instance if you need to install node and then python packages from requirements.txt file, use this build command.

```
bash install_node.sh && pip install -r requirements.txt
```
