-
Notifications
You must be signed in to change notification settings - Fork 2
/
00_setup.sh
38 lines (29 loc) · 967 Bytes
/
00_setup.sh
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
#!/bin/env bash
set -o xtrace
# cd <project-root>
[ -d "./src" ] || { echo "Must run from the project root!"; exit 1 ;}
# Parse arguments
for i in "$@"; do
case $i in
--bucket-sa-key-file=*)
BUCKET_SA_KEY_FILE="${i#*=}"
shift # past argument=value
;;
esac
done
if [ ! "${BUCKET_SA_KEY_FILE}" ]; then
echo "Missing required argument: --bucket-sa-key-file=..."
exit 1
fi
# --
echo "Installing Neu.ro platform clients"
pip install -Uq neuro-cli neuro-extras
echo "Logging in to the Neu.ro platform"
#neuro login # register with email and get free 100h gpu
neuro config switch-cluster neuro-compute
echo "Securely uploading bucket credentials"
neuro secret add bucket-sa-key @${BUCKET_SA_KEY_FILE}
echo "Uploading the project"
neuro cp -ru . -T storage:yelp_dataset --exclude data --exclude lightning_logs --exclude mlruns --exclude .git
#echo "Building training image"
#neuro-extras image build -f Dockerfile . image:yelp_dataset:v1.0