forked from NVIDIA/workbench-example-nemo-ptuning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase-command.sh
More file actions
26 lines (21 loc) · 746 Bytes
/
base-command.sh
File metadata and controls
26 lines (21 loc) · 746 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
#!/bin/bash
# *** AUTO-GENERATED FILE - DO NOT EDIT ****
# This script is required when running projects in NGC Base Command from Workbench
# It is safe to delete if you do not plan to run this project in NGC Base Command
if [ -z "$NVWB_BASE_COMMAND" ]
then
echo "base-command.sh should only be used while executing in Base Command."
exit 1
fi
# Wipe workspace contents prior to clone
echo "Erasing project workspace mounted at /project"
cd /project
rm -rf ..?* .[!.]* *
ls -la /project
# Clone the repo into the workspace
echo "Cloning https://${NVWB_PROJECT_URL} into /project"
git clone https://${NVWB_GIT_USERNAME}:${NVWB_GIT_PASSWORD}@${NVWB_PROJECT_URL} /project
# Run the command
echo "running $@"
cd /project$NVWB_SCRIPT_DIR
$@