Skip to content

Commit 2d9db0d

Browse files
Optional section in the IDE notebook
1 parent 90bb7d8 commit 2d9db0d

File tree

1 file changed

+38
-14
lines changed

1 file changed

+38
-14
lines changed

SageMaker_SSH_IDE.ipynb

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"cell_type": "markdown",
1919
"metadata": {},
2020
"source": [
21-
"## Environment & SSM Setup"
21+
"## Environment setup"
2222
]
2323
},
2424
{
@@ -78,32 +78,47 @@
7878
},
7979
{
8080
"cell_type": "markdown",
81-
"metadata": {},
8281
"source": [
83-
"Specify JetBrains License Server host name in `JB_LICENSE_SERVER_HOST` variable. Leave it as is if you don't use one, e.g. use PyCharm Community or VS Code, or already configured one from another kernel app (the value will be shared between apps).\n",
82+
"## (Optional) Remote desktop / VNC setup\n",
8483
"\n",
85-
"Please, make sure you've configured the same value on your local machine (see the script `sm-local-ssh-ide`)."
86-
]
84+
"If you don't plan to run any GUI apps inside SageMaker Studio, skip to the next section or run the cells as is (safe defaults)."
85+
],
86+
"metadata": {
87+
"collapsed": false
88+
}
89+
},
90+
{
91+
"cell_type": "markdown",
92+
"source": [
93+
"Choose your VNC password. It's safe to leave it as is, because your connection will be already secured with SSH and SSM. You need some password, because some VNC clients do not allow passwordless connections.\n",
94+
"\n",
95+
"If you already configured password from another kernel app, this cell will take no effect (the encrypted password file will be shared between apps)."
96+
],
97+
"metadata": {
98+
"collapsed": false
99+
}
87100
},
88101
{
89102
"cell_type": "code",
90103
"execution_count": null,
91-
"metadata": {},
92104
"outputs": [],
93105
"source": [
94106
"%%sh\n",
95-
"JB_LICENSE_SERVER_HOST=\"jetbrains-license-server.example.com\" # replace with your JetBrains License Server host name\n",
107+
"VNC_PASSWORD=\"123456\" # replace with your password\n",
96108
"\n",
97-
"sm-ssh-ide set-jb-license-server \"$JB_LICENSE_SERVER_HOST\""
98-
]
109+
"sm-ssh-ide set-vnc-password \"$VNC_PASSWORD\""
110+
],
111+
"metadata": {
112+
"collapsed": false
113+
}
99114
},
100115
{
101116
"cell_type": "markdown",
102117
"metadata": {},
103118
"source": [
104-
"Now choose your VNC password. It's safe to leave it as is, because your connection will be already secured with SSH and SSM. You need some password, because some VNC clients do not allow passwordless connections.\n",
119+
"Specify JetBrains License Server host name in `JB_LICENSE_SERVER_HOST` variable. Leave it as is if you don't use one, e.g. use PyCharm Community or VS Code, or already configured one from another kernel app (the value will be shared between apps).\n",
105120
"\n",
106-
"If you already configured password from another kernel app, this cell will take no effect (the encrypted password file will be shared between apps)."
121+
"Please, make sure you've configured the same value on your local machine (see the script `sm-local-ssh-ide`)."
107122
]
108123
},
109124
{
@@ -113,11 +128,20 @@
113128
"outputs": [],
114129
"source": [
115130
"%%sh\n",
116-
"VNC_PASSWORD=\"123456\" # replace with your password\n",
131+
"JB_LICENSE_SERVER_HOST=\"jetbrains-license-server.example.com\" # replace with your JetBrains License Server host name\n",
117132
"\n",
118-
"sm-ssh-ide set-vnc-password \"$VNC_PASSWORD\""
133+
"sm-ssh-ide set-jb-license-server \"$JB_LICENSE_SERVER_HOST\""
119134
]
120135
},
136+
{
137+
"cell_type": "markdown",
138+
"source": [
139+
"## SSM setup"
140+
],
141+
"metadata": {
142+
"collapsed": false
143+
}
144+
},
121145
{
122146
"cell_type": "markdown",
123147
"metadata": {
@@ -154,7 +178,7 @@
154178
"source": [
155179
"The `start` command will run the background applications for remote access – SSH daemon, VNC server and Jupyter notebook. The `stop` command helps with cleanup from previous runs (see the next section).\n",
156180
"\n",
157-
"If you don't want to run a VNC server and Jupyter notebook, pass the flag `--ssh-only` to the `start` command. Also consider passing the same flag to the `sm-local-ssh-ide` command."
181+
"If you don't want to run a VNC server and Jupyter notebook, pass the flag `--ssh-only` to the `start` command. Also consider passing the same flag to the `sm-local-ssh-ide` command (you will find it in further instructions)."
158182
]
159183
},
160184
{

0 commit comments

Comments
 (0)