File tree 2 files changed +45
-1
lines changed
.devcontainer/planetary-computer-datagenerator
datagenerators/planetary-computer/datagenerator
2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 41
41
}
42
42
},
43
43
"remoteUser" : " root" ,
44
- "postStartCommand" : " "
44
+ "postStartCommand" : " bash /workspace/planetary-computer-datagenerator/devcontainer_postStart.sh "
45
45
}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Runs after the container is started to install poetry and the local package
4
+ #
5
+ #
6
+
7
+ # Script Flags
8
+ SCRIPT_NAME=$( basename " $0 " )
9
+
10
+
11
+ install_poetry () {
12
+ echo " START: ${FUNCNAME[0]} "
13
+ curl -sSL https://install.python-poetry.org | POETRY_HOME=/root/.local python3 -
14
+ chmod +x /root/.local/bin/poetry
15
+ echo " END: ${FUNCNAME[0]} "
16
+ }
17
+
18
+ install_package () {
19
+ echo " START: ${FUNCNAME[0]} "
20
+ /root/.local/bin/poetry config virtualenvs.create false
21
+ rm -f -- /workspace/planetary-computer-datagenerator/poetry.lock
22
+ /root/.local/bin/poetry install --with dev
23
+ rm -f -- /workspace/planetary-computer-datagenerator/poetry.lock
24
+ echo " END: ${FUNCNAME[0]} "
25
+ }
26
+
27
+ clean_up () {
28
+ echo " START: ${FUNCNAME[0]} "
29
+ echo " rm -rf /workspace/planetary-computer-datagenerator/.devcontainer/tmp"
30
+ rm -rf /workspace/planetary-computer-datagenerator/.devcontainer/tmp
31
+ echo " END: ${FUNCNAME[0]} "
32
+ }
33
+
34
+ main () {
35
+ echo " START: ${SCRIPT_NAME} "
36
+ echo " ------------------------------------------"
37
+ install_poetry
38
+ install_package
39
+ clean_up
40
+ echo " ------------------------------------------"
41
+ echo " END: ${SCRIPT_NAME} "
42
+ }
43
+
44
+ main
You can’t perform that action at this time.
0 commit comments