-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneration_slurm.sh
More file actions
executable file
·56 lines (46 loc) · 1.46 KB
/
generation_slurm.sh
File metadata and controls
executable file
·56 lines (46 loc) · 1.46 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=2
#SBATCH --gres=gpu:1
#SBATCH --gpus-per-task=1
#SBATCH --time=03:00:00
#SBATCH --mem-per-cpu=49152
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
# Load modules
module purge
module load release/24.10 CUDA/12.8.0
module load GCCcore/13.2.0 Python/3.11.5
cd ~/DissBench
# Load environment variables from file
echo "=== Loading environment variables from .env file..."
set -a # automatically export all variables
source .env
set +a
echo "=== Loading venv at $VENV_PATH..."
source $VENV_PATH/bin/activate
# Set additional environment variables that aren't in .env
echo "=== Setting additional environment variables..."
export PIP_CACHE_DIR=/tmp/pip_cache
export TORCH_EXTENSIONS_DIR=/tmp/torch_extensions
export NVCC_CACHE_DIR=/tmp/nvcc_cache
export HF_METRICS_CACHE=/tmp/hf_metrics_cache
export TMPDIR=/tmp
export XDG_CACHE_HOME=/tmp
export VLLM_WORKER_MULTIPROC_METHOD=spawn
echo "=== Environment variables set:"
# Benchmark Specific
echo "DATASET_PATH=$DATASET_PATH"
echo "OUTPUT_DIR=$OUTPUT_DIR"
# General
echo "HF_HOME=$HF_HOME"
echo "HF_HUB_CACHE=$HF_HUB_CACHE"
echo "PIP_CACHE_DIR=$PIP_CACHE_DIR"
echo "TORCH_EXTENSIONS_DIR=$TORCH_EXTENSIONS_DIR"
echo "TMPDIR=$TMPDIR"
echo "NVCC_CACHE_DIR=$NVCC_CACHE_DIR"
echo "HF_METRICS_CACHE=$HF_METRICS_CACHE"
echo "XDG_CACHE_HOME=$XDG_CACHE_HOME"
echo "VLLM_WORKER_MULTIPROC_METHOD=$VLLM_WORKER_MULTIPROC_METHOD"
echo "=== Running the Benchmark script..."
srun ./run_benchmark.sh
exit 0