execute_vehicle_classification.sh 1.09 KB
Newer Older
1
#!/bin/bash
2
#SBATCH --time=20:00
3
4
#SBATCH --cpus-per-task=80
#SBATCH --nodes=1
5
#SBATCH --job-name=vehicle_classification
6
7
8
9
10
11
12
13
14
15

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)
16
echo "$1" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
17
18
19
20

#pull gitlab repository
echo "pulling gitlab repository"
git init
21
# git pull git@transfer.hft-stuttgart.de:fork_hpc_vehicle_classification/hpc_vehicle_classification.git
22
# git config --global pull.ff only git@transfer.hft-stuttgart.de:fork_hpc_vehicle_classification/hpc_vehicle_classification.git
23
24
# git pull git@transfer.hft-stuttgart.de:81nasi1bwi/hpc_vehicle_classification.git
git pull https://transfer.hft-stuttgart.de/gitlab/81nasi1bwi/hpc_vehicle_classification.git
25
26
27
28

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

echo "running python code"
33
main.py