Skip to content

Commit 97dbfdf

Browse files
authored
Added check for data wrangler app in LCC script
1 parent ec1dbad commit 97dbfdf

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,35 @@ Use Studio LifeCycle configuration
1818
```
1919
#!/bin/bash
2020
21-
set -ex
22-
cd ~
23-
if cd sagemaker-studio-docker-cli-extension
24-
then
25-
git reset --hard
26-
git pull
21+
set -eux
22+
STATUS=$(python3 -c "import sagemaker_dataprep";echo $?)
23+
if [ "$STATUS" -eq 0 ]; then
24+
echo 'Instance is of Type Data Wrangler'
2725
else
28-
git clone https://github.com/aws-samples/sagemaker-studio-docker-cli-extension.git
29-
cd sagemaker-studio-docker-cli-extension
26+
echo 'Instance is not of Type Data Wrangler'
27+
cd ~
28+
if cd sagemaker-studio-docker-cli-extension
29+
then
30+
git reset --hard
31+
git pull
32+
else
33+
git clone https://github.com/aws-samples/sagemaker-studio-docker-cli-extension.git
34+
cd sagemaker-studio-docker-cli-extension
35+
fi
36+
nohup ./setup.sh > docker_setup.out 2>&1 &
37+
38+
if cd ~/sagemaker-studio-docker-ui-extension
39+
then
40+
git reset --hard
41+
git pull
42+
cd
43+
else
44+
cd
45+
git clone https://github.com/aws-samples/sagemaker-studio-docker-ui-extension.git
46+
fi
47+
48+
nohup ~/sagemaker-studio-docker-ui-extension/setup.sh > docker_setup.out 2>&1 &
3049
fi
31-
nohup ./setup.sh > docker_setup.out 2>&1 &
32-
33-
if cd ~/sagemaker-studio-docker-ui-extension
34-
then
35-
git reset --hard
36-
git pull
37-
cd
38-
else
39-
cd
40-
git clone https://github.com/aws-samples/sagemaker-studio-docker-ui-extension.git
41-
fi
42-
43-
nohup ~/sagemaker-studio-docker-ui-extension/setup.sh > docker_setup.out 2>&1 &
4450
```
4551

4652
## Security

0 commit comments

Comments
 (0)