The --run_program_once
parameter
The parameter
run_program_once
🐚 allows you to run a shell command or script once before your actual program starts.Use it to:
- ⚙️ install dependencies
- 🌐 download datasets
- 🧹 prepare folders
- 🔧 configure environments
bash /absolute/path/to/install.sh
or
bash relative/path/to/install.sh
The path is relative to your current pwd when starting this job.
Example: install.sh
Here’s an example install.sh
you might call with run_program_once
:#!/bin/bash
echo "Installing dependencies..."
python3 -mvenv virtual_env
source virtual_env/bin/activate
pip install -r requirements.txt
echo "Downloading dataset..."
wget https://example.com/dataset.zip
unzip dataset.zip -d ./data
echo "Done"
Tips
- This runs once per experiment, not per trial.
- Great for setup work you don’t want repeated.
- You can call any Bash-compatible command or script.