|
1 | 1 | # Running on AWS SageMaker |
2 | 2 |
|
3 | | -If you're using AWS SageMaker, |
| 3 | +If you're using AWS SageMaker, make sure what version of JupyterLab it is |
| 4 | +running. If you are not sure, you can open a terminal and running the following |
| 5 | +command: |
| 6 | + |
| 7 | +``` |
| 8 | +jupyter --version |
| 9 | +``` |
| 10 | + |
| 11 | +Look for the line with the name "jupyterlab". |
| 12 | + |
| 13 | +**If the version is JupyterLab 1.x or 2.x:** |
4 | 14 |
|
5 | 15 | 1. Stop and start your sagemaker instance (to make sure you're starting fresh) |
6 | | -2. Open a terminal, and run `source activate JupyterSystemEnv` to switch to JupyterLab's conda environment |
| 16 | +2. Open a terminal, and run `source activate JupyterSystemEnv` to switch to JupyterLab's conda environm |
| 17 | +ent |
7 | 18 | 3. Run `jupyter labextension install jupyterlab-s3-browser` to install the lab extension |
8 | 19 | 4. Run `pip install jupyterlab-s3-browser` to install the server extension |
9 | | -5. Run `jupyter serverextension enable --py jupyterlab_s3_browser` to make sure the server extension is enabled |
| 20 | +5. Run `jupyter serverextension enable --py jupyterlab_s3_browser` to make sure the server extension is |
| 21 | + enabled |
10 | 22 | 6. Run `sudo initctl restart jupyter-server --no-wait` to restart your jupyterlab server |
11 | 23 | 7. Refresh the page |
12 | | -8. You should now have the bucket icon on your sidebar. Use https://s3.amazonaws.com as your endpoint. Enter your access key and secret key generated on this page: https://console.aws.amazon.com/iam/home#security_credential |
13 | 24 |
|
14 | | -You'll need to perform these instructions every time you log in, because SageMaker doesn't save the state of your installed extensions. |
| 25 | +**If the version is JupyterLab 3.x:** |
| 26 | + |
| 27 | +1. Stop and start your sagemaker instance (to make sure you're starting fresh) |
| 28 | +2. Open a terminal, and run `conda activate studio` to switch to JupyterLab's conda environment |
| 29 | +3. Run `pip install jupyterlab-s3-browser` to install the server extension |
| 30 | +4. Run `jupyter serverextension enable --py jupyterlab_s3_browser` to make sure the server extension is |
| 31 | + enabled |
| 32 | +5. Run `restart-jupyter-server` to restart your jupyterlab server |
| 33 | +6. Refresh the page |
| 34 | + |
| 35 | +You should now have the bucket icon on your sidebar. Use |
| 36 | +https://s3.amazonaws.com as your endpoint. Enter your access key and secret key |
| 37 | +generated on this page: |
| 38 | +https://console.aws.amazon.com/iam/home#security_credential. |
| 39 | + |
| 40 | +You'll need to perform these instructions every time you log in, because SageMaker doesn't save the sta |
| 41 | +te of your installed extensions. However, you can create a lifecycle configuration that executes those |
| 42 | +commands (except restarting the server) every time an instance is created |
0 commit comments