forked from zayn303/tv-program-web-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_load_tv_to_sqlite.slurm
More file actions
36 lines (29 loc) · 917 Bytes
/
run_load_tv_to_sqlite.slurm
File metadata and controls
36 lines (29 loc) · 917 Bytes
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
33
34
35
36
#!/bin/bash
#SBATCH --job-name=tvguide-sqlite
#SBATCH --time=00:05:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=1G
#SBATCH --output=logs/%x_%j.out
#SBATCH --error=logs/%x_%j.err
set -euo pipefail
cd "$SLURM_SUBMIT_DIR"
mkdir -p logs
echo "=== $(date) | Starting $SLURM_JOB_ID in $PWD ==="
# Optional: use your existing venv; not required but harmless
VENV_DIR="./home/ak562fx/ss"
if [ -d "$VENV_DIR" ]; then
# shellcheck disable=SC1090
source "$VENV_DIR/bin/activate"
fi
# No requirements needed for sqlite3, but if you keep a requirements.txt, this won't hurt
if [ -f requirements.txt ] && [ -s requirements.txt ]; then
python -m pip install --upgrade pip
pip install --no-input -r requirements.txt
fi
# Sanity check inputs
ls -l tv_programs_*.txt || true
test -f load_tv_programs_sqlite.py
# Run
srun python load_tv_programs_sqlite.py
echo "=== $(date) | Finished $SLURM_JOB_ID ==="