execute_vehicle_classification.sh 881 Bytes
Newer Older
1
#!/bin/bash
2
#SBATCH --time=20
3
4
5
6
7
#SBATCH --mem=16000
#SBATCH --ntasks=1
#SBATCH --partition=gpu_8
#SBATCH --mem-per-cpu=94000
#SBATCH --gres=gpu:4
8
#SBATCH --job-name=vehicle_classification
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

echo "creating folder"
#create folder and change directory
mkdir -p ~/hpc_vehicle_classification
cd ~/hpc_vehicle_classification
pwd

echo "handling ssh-key"
#handle SSH-key (the argument "$1" is the SSH-key to gitlab)
eval $(ssh-agent -s)
echo "$1" | base64 -d | tr -d '\r' | ssh-add - > /dev/null

#pull gitlab repository
echo "pulling gitlab repository"
git init
git pull git@transfer.hft-stuttgart.de:fork_hpc_vehicle_classification/hpc_vehicle_classification.git

#loading conda environment
echo "load and activate virtual environment"
eval "$(conda shell.bash hook)"
conda env create -f environment.yml
conda activate env_vehicle_classification

echo "running python code"
python main.py