Giter Club home page Giter Club logo

amazon-sagemaker-codeserver's Introduction

code-server on Amazon SageMaker

A solution to install and run code-server on Amazon SageMaker, and access it from the browser to develop and test your ML models.

Code-server screenshot

Highlights

This solution works for both Amazon SageMaker Studio and Amazon SageMaker Notebook Instances configured to run with both JupyterLab 3 (recommended) and JupyterLab 1 (with limitations). For additional information on compatibility, please check the compatiblity matrix.

Features - Amazon SageMaker Studio

  • Access code-server from the Amazon SageMaker Studio launcher
  • Automatically create a dedicated Conda environment
  • Automatically install MS Python extension
  • Use a custom extension gallery

Features - Amazon SageMaker Notebook Instances

  • Access code-server from both the JupyterLab launcher and the Jupyter notebook File menu
  • Automatically create a dedicated Conda environment
  • Run with diverse instance types (CPU/GPU)
  • Automatically install MS Python extension
  • Automatically install Docker extension
  • Use a custom extension gallery
  • Persistent installation (no need to re-install when Notebook Instances are stopped and re-started)

Screenshots

Studio launcher button
Notebook Instance launcher button Notebook Instance New menu item
Code-server terminal Code-server intellisense

Getting Started

There are two ways to get started and install the solution in Amazon SageMaker:

  1. [Recommended] Using lifecycle configuration scripts that will install code-server automatically when SageMaker Studio or Notebook Instances are spin-up.
  2. Install code-server manually from the Jupyter system terminal

In both cases we are going to leverage on the following install scripts:

The install procedure is based on the latest stable release of the solution as of today.

Install with Lifecycle Configurations

Amazon SageMaker Studio

When using Amazon SageMaker Studio, code-server must be installed on the instance that runs the JupyterServer application. For further information on the Studio architecture, please refer to this blog post. By using Studio lifecycle configurations, we can make sure code-server is installed automatically when the JupyterServer application is spin-up, and enable this behavior by default either for all users in the Studio domain or for a specific Studio user profile.

Example: install code-server automatically for all users in the Studio domain

From a terminal appropriately configured with AWS CLI, run the following commands:

curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz
tar -xvzf amazon-sagemaker-codeserver-0.2.0.tar.gz

cd amazon-sagemaker-codeserver/install-scripts/studio

LCC_CONTENT=`openssl base64 -A -in install-codeserver.sh`

aws sagemaker create-studio-lifecycle-config \
    --studio-lifecycle-config-name install-codeserver-on-jupyterserver \
    --studio-lifecycle-config-content $LCC_CONTENT \
    --studio-lifecycle-config-app-type JupyterServer \
    --query 'StudioLifecycleConfigArn'

aws sagemaker update-domain \
    --region <your_region> \
    --domain-id <your_domain_id> \
    --default-user-settings \
    '{
    "JupyterServerAppSettings": {
    "DefaultResourceSpec": {
    "LifecycleConfigArn": "arn:aws:sagemaker:<your_region>:<your_account_id>:studio-lifecycle-config/install-codeserver-on-jupyterserver",
    "InstanceType": "system"
    },
    "LifecycleConfigArns": [
    "arn:aws:sagemaker:<your_region>:<your_account_id>:studio-lifecycle-config/install-codeserver-on-jupyterserver"
    ]
    }}'

Make sure to replace <your_domain_id>, <your_region> and <your_account_id> in the previous commands with the Studio domain ID, the AWS region and AWS Account ID you are using respectively.

Amazon SageMaker Notebook Instances

Amazon SageMaker Notebook Instances support lifecycle configuration scripts that run when the instance is created and when the instance is started (re-run also at restart after the instance is stopped). As a consequence, we can make sure to install code-server once when the instance is created, and setup it on start. For more information on lifecycle configurations please check the SageMaker Notebook Instances lifecycle configurations documentation.

Example: Create a notebook instance and install code-server automatically

From a terminal appropriately configured with AWS CLI, run the following commands:

curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz
tar -xvzf amazon-sagemaker-codeserver-0.2.0.tar.gz

cd amazon-sagemaker-codeserver/install-scripts/notebook-instances

aws sagemaker create-notebook-instance-lifecycle-config \
    --notebook-instance-lifecycle-config-name install-codeserver \
    --on-start Content=$((cat setup-codeserver.sh || echo "")| base64) \
    --on-create Content=$((cat install-codeserver.sh || echo "")| base64)

aws sagemaker create-notebook-instance \
    --notebook-instance-name <your_notebook_instance_name> \
    --instance-type <your_instance_type> \
    --role-arn <your_role_arn> \
    --lifecycle-config-name install-codeserver

Make sure to replace <your_notebook_instance_name>, <your_instance_type> and <your_role_arn> in the previous commands with the appropriate values.

Install manually

Amazon SageMaker Studio

  1. Open the Amazon SageMaker Studio system terminal

  2. From the terminal, run the following commands:

     curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz
     tar -xvzf amazon-sagemaker-codeserver-0.2.0.tar.gz
    
     cd amazon-sagemaker-codeserver/install-scripts/studio
     
     chmod +x install-codeserver.sh
     ./install-codeserver.sh
    
     # Note: when installing on JL1, please prepend the nohup command to the install command above and run as follows: 
     # nohup ./install-codeserver.sh
    
  3. After the execution of the commands completes, reload the browser window and the code-server launcher button will appear in Studio as shown in the screenshots above.

Amazon SageMaker Notebook Instances

  1. Access JupyterLab and open a terminal

  2. From the terminal run the following commands:

     curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz
     tar -xvzf amazon-sagemaker-codeserver-0.2.0.tar.gz
    
     cd amazon-sagemaker-codeserver/install-scripts/notebook-instances
     
     chmod +x install-codeserver.sh
     chmod +x setup-codeserver.sh
     sudo ./install-codeserver.sh
     sudo ./setup-codeserver.sh
    
  3. After the execution of the commands completes, reload the browser window and the code-server launcher button will appear as shown in the screenshots above.

Note: code-server and extensions installations are persistent on the notebook instance. However, if you stop or restart the instance, you need to run the following command to reconfigure code-server

sudo ./setup-codeserver.sh

Advanced configuration

The install scripts define the following variables that can be modified to customize the install procedure.

  • CODE_SERVER_VERSION - The version of code-server to install. The solution is tested with version 4.16.1. For a list of the available releases, please check https://github.com/coder/code-server/releases
  • CODE_SERVER_INSTALL_LOC - The install location for code-server. For notebook instance setup, please make sure to choose a path on the attached EBS volume (under /home/ec2-user/SageMaker/).
  • XDG_DATA_HOME - The directory where user-specific code-server data is stored.
  • XDG_CONFIG_HOME - The directory where user-specific code-server config is stored.
  • INSTALL_PYTHON_EXTENSION - Set to 1 if the ms-python.python extension must be installed; 0 otherwise.
  • CREATE_NEW_CONDA_ENV - Set to 1 if a new Conda environment must be created, 0 otherwise. This environment is supposed to be used when developing with code-server, to avoid conflicting with existing Conda environments in Studio or Notebook Instances.
  • CONDA_ENV_LOCATION - The location where the Conda environment will be created. Applies only when CREATE_NEW_CONDA_ENV is set to 1.
  • CONDA_ENV_PYTHON_VERSION - The version of Python to install in the new Conda environment. Applies only when CREATE_NEW_CONDA_ENV is set to 1.
  • INSTALL_DOCKER_EXTENSION - Set to 1 if the ms-azuretools.vscode-docker extension must be installed; 0 otherwise. Applies only to Notebook Instances.
  • USE_CUSTOM_EXTENSION_GALLERY - Set to 1 if using a custom extension gallery for code-server, 0 otherwise. A custom extension gallery must adhere to the Extension Gallery API schema. Additional info: https://coder.com/docs/code-server/latest/FAQ#how-do-i-use-my-own-extensions-marketplace
  • EXTENSION_GALLERY_CONFIG - The API configuration for using a custom extension gallery. Applies only when USE_CUSTOM_EXTENSION_GALLERY is set to 1.
  • LAUNCHER_ENTRY_TITLE - The label of the button added to the JupyterLab launcher. Defaults to 'Code Server'.
  • PROXY_PATH - The path that is appended to the Jupyter URI to access code-server. Defaults to 'codeserver'. Changing this value will cause the code-server icon not being used, and falling-back to a generic icon.
  • LAB_3_EXTENSION_DOWNLOAD_URL - The download URL of the JupyterLab 3 extension.

Architecture

Amazon SageMaker Studio

Studio Architecture

Amazon SageMaker Notebook Instances

Notebook Instances Architecture

Compatibility

Compatibility matrix

Please read the following section for the known limitations when using JupyterLab 1.

Caveats / known limitations

  • When using SageMaker Studio, code-server data and configuration are stored in non-persistent volumes. As a consequence, when deleting and re-creating a JupyterServer app for a specific user, the install procedure has to be executed again (either automatically with lifecycle configurations, or manually). Please also note that user-specified code-server settings, user-installed extensions, etc. will be lost and will need to be set/installed again. The same considerations apply to the Conda environment. This behavior can be modified by changing the XDG_DATA_HOME, XDG_CONFIG_HOME or CONDA_ENV_LOCATION to use the persistent Amazon EFS volume (mounted on /home/sagemaker-user/) based on needs.
  • When using rootless mode in SageMaker Notebook Instances (https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-root-access.html), you will need to manually shutdown the JupyterServer at the end of the install procedure, by opening the File menu and clicking on Shut Down.
  • Starting from release 0.2.0 the JupyterLab 1 extension that shows the button to launch code-server in either Studio or Notebook Instances is not supported anymore. However, JupyterLab 1 users can still install this solution and access code-server by typing the following URLs in the browser (and replacing the in the URLs):
    • For SageMaker Notebook Instances: https://<notebook_instance_name>.notebook.<region>.sagemaker.aws/codeserver/
    • For SageMaker Studio: https://<domain_id>.studio.<region>.sagemaker.aws/jupyter/default/codeserver/

License

This project is licensed under the MIT-0 License.

Authors

Giuseppe A. Porcelli - Principal, ML Specialist Solutions Architect - Amazon SageMaker

Credits

Sofian Hamiti and Prayag Singh for the Hosting VS Code on SageMaker blog post this work is inspired to.

amazon-sagemaker-codeserver's People

Contributors

amazon-auto avatar giuseppeporcelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-sagemaker-codeserver's Issues

Error loading webview: Could not register service workers

Hi folks - nice solution! Generally seems to be working OK for me so far, at Code Server v4.8.0 and Firefox ESR v102 and SMStudio JupyterLab v3.

One issue I'm seeing though, is keep getting an error pop-up/toast in the lower right corner saying:

Error loading webview: Error: Could not register service workers: SecurityError: The operation is insecure..

General experience doesn't seem to be affected, but I think some of the e.g. new extension setup screens (like AWS Toolkit for example) might be missing some content? And if the app is failing to register workers it's probably also running slower (on client side) than it could.

Any known fixes for this? Has anybody else come across it? At first I thought (from this Mozilla bug) that it might be Firefox related, but it looks (from this Reddit thread) like others may have encountered this issue with Code in the past also...

Can't get this to work on new Sagemaker Studio

I want to connect my local VSCode to a code server on sagemaker and found out this repo.

However I followed the steps from the README to automatically install the codeserver on the entire domain, but when using the new Sagemaker Studio (not classic) and starting a new JupyterLab, the app shows up a broken icon:

image

When clicking at it, an error 500 happens with apparently no log at all:

image

Is this compatible with the new sagemaker studio? Can we connect our local vscode to the new sagemaker studio by using another method?

Simpler configuration of options (like code-server version)

I would like to automate the setup of codeserver, but I'd like to change the code-server version. Currently, both setup-codeserver and install-codeserver need to be edited to change this. This would be possible with something like sed, but a bit clunky.

I think either using cli arguments or environment variables would be a good solution. Environments variables would be a small change from:

CODE_SERVER_VERSION="4.5.2"

to

CODE_SERVER_VERSION="${CODE_SERVER_VERSION:-4.5.2}"

Then my installation script would be:

 curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/amazon-sagemaker-codeserver-0.1.5.tar.gz
 tar -xvzf amazon-sagemaker-codeserver-0.1.5.tar.gz

 cd amazon-sagemaker-codeserver/install-scripts/notebook-instances
 
 chmod +x install-codeserver.sh
 chmod +x setup-codeserver.sh
 export CODE_SERVER_VERSION="4.13.0"
 sudo ./install-codeserver.sh
 sudo ./setup-codeserver.sh

Would this be possible to implement? I can propose a PR if it helps.

Creating a new Jupyter notebok gets stucks

I installed VS Code code server on a standalone sagemaker nteobook.
When I create a new notebook, I am able to switch kernels but the notebook doesnt load. Image attached.
image

[Feature Suggestion] Install ipykernel by default

VSCode defaults to the codeserver_py39. However, that kernel is unable to even run notebook cells.

Running cells with 'Python 3.9.15 ('codeserver_py39': conda)' requires ipykernel package.
Run the following command to install 'ipykernel' into the Python environment. 
Command: 'conda install -n codeserver_py39 ipykernel --update-deps --force-reinstall'

Unfortunately changing the default does not appear to be possible: microsoft/vscode#130946

Thus, I suggest adding a installation of ipykernel for codeserver_py39 to the install/setup script (not sure which one).

Installing the sagemaker python sdk sagemaker would probably also be a good idea.

Config option `kernel_spec_manager_class` not recognized by `DisableLabExtensionsApp`.

Platform identifier
Amazon Linux 2, Jupyter Lab 3
(notebook-al2-v2)

setup-codeserver.sh outputs before the systemctl restart jupyter-server command is executed:

Config option `kernel_spec_manager_class` not recognized by `DisableLabExtensionsApp`.
[W 2022-11-15 07:38:31.512 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.

Afterwards, jupyterlab restarts and the instance is returning a 503. When I restart the notebook it is working again, but code-server is not activated.

image

Here is the full log:

sh-4.2$ sudo ./setup-codeserver.sh
+ CODE_SERVER_VERSION=4.5.2
+ CODE_SERVER_INSTALL_LOC=/home/ec2-user/SageMaker/.cs
+ XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ CREATE_NEW_CONDA_ENV=1
+ CONDA_ENV_LOCATION=/home/ec2-user/SageMaker/.cs/conda/envs/codeserver_py39
+ USE_CUSTOM_EXTENSION_GALLERY=0
+ EXTENSION_GALLERY_CONFIG='{{\"serviceUrl\":\"\",\"cacheUrl\":\"\",\"itemUrl\":\"\",\"controlUrl\":\"\",\"recommendationsUrl\":\"\"}}'
+ LAUNCHER_ENTRY_TITLE='Code Server'
+ PROXY_PATH=codeserver
+ LAB_3_EXTENSION_DOWNLOAD_URL=https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/sagemaker-jproxy-launcher-ext-0.1.3.tar.gz
+ INSTALL_LAB1_EXTENSION=1
+ LAB_1_EXTENSION_DOWNLOAD_URL=https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/amzn-sagemaker-jproxy-launcher-ext-jl1-0.1.4.tgz
+ export XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ export XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ export PATH=/home/ec2-user/SageMaker/.cs/bin/:/sbin:/bin:/usr/sbin:/usr/bin
+ PATH=/home/ec2-user/SageMaker/.cs/bin/:/sbin:/bin:/usr/sbin:/usr/bin
+ EXT_GALLERY_JSON=
+ '[' 0 -eq 1 ']'
+ JUPYTER_CONFIG_FILE=/home/ec2-user/.jupyter/jupyter_notebook_config.py
+ grep -q /home/ec2-user/SageMaker/.cs/bin /home/ec2-user/.jupyter/jupyter_notebook_config.py
+ cat
++ /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/jupyter-lab --version
+ JUPYTER_LAB_VERSION=3.5.0
+ sudo -u ec2-user -i
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 19651  100 19651    0     0  25306      0 --:--:-- --:--:-- --:--:--  223k
Looking in indexes: https://pypi.org/simple, https://pip.repos.neuron.amazonaws.com
Processing ./SageMaker/.cs/lab_ext/sagemaker-jproxy-launcher-ext.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: sagemaker-jproxy-launcher-ext
  Building wheel for sagemaker-jproxy-launcher-ext (pyproject.toml) ... done
  Created wheel for sagemaker-jproxy-launcher-ext: filename=sagemaker_jproxy_launcher_ext-0.1.3-py3-none-any.whl size=28044 sha256=07c6e1b86f57d64e26b94a21c11d9871db08f9263b51d97af802f31c13ac7705
  Stored in directory: /home/ec2-user/.cache/pip/wheels/b1/ae/23/e402630d56afaedbf7083d851b13612dbb641f84efdc4523b5
Successfully built sagemaker-jproxy-launcher-ext
Installing collected packages: sagemaker-jproxy-launcher-ext
Successfully installed sagemaker-jproxy-launcher-ext-0.1.3
Config option `kernel_spec_manager_class` not recognized by `DisableLabExtensionsApp`.
[W 2022-11-15 07:38:31.512 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.
+ systemctl restart jupyter-server

Codeserver Icon doesn't appear

So I've followed this guide to set up coderserver on SageMaker Studio.

The codeserver icon doesn't appear but I can still access the codeserver by slightly changing the URL -
[domain-id].studio.[aws-region].sagemaker.aws/jupyter/default/codeserver. Screenshot below.

codeserver

I suspect that icon fails to attach because of the new SageMaker Studio UI. Screenshot below.

new UI

I noticed the new UI on 5th December 22 which is when I tried to set up the codeserver on SageMaker Studio.

need to specify platform identifier?

Great solution here! Just fyi - I had to specify the platform identifier "notebook-al2-v1" when creating the notebook instances along with CLI commands posted on the README; else, it defaulted to Amazon Linux 1 and did not start.

One of the options I used with aws sagemaker create-notebook-instances was:

--platform-identifier "notebook-al2-v1"

Best practice for getting more compute for VSCode?

Hi team -- very cool, but it's not clear how we can throw more compute at Option A? Pylance struggles on the default approach for Option A with a decent sized git repo, and I haven't tried turning on Copilot yet. Is Option B the recommended way around this?

Sagemaker Notebook Instance in VPC, code-server --install-extension hangs

I am running a notebook instance in a VPC with egress controls.

The command code-server --install-extension ms-python.python --force of the install-codeserver.sh file hangs on step:

Installing extensions...

Do you know which URL the code-serverprocess is reaching out to, to download the extension?

will be python plot shown as can be done by usning X11

will be python plot shown
as can be done by usning X11

for example
import matplotlib.pyplot as plt

generate data

x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]

plot data

plt.plot(x, y)
plt.title('Simple Plot')
plt.xlabel('X Axis')
plt.ylabel('Y Axis')

show plot

plt.show()

systemctl: command not found

I went onto jupyterlab, opened a terminal, and ran the following from the AWS guide:

curl -LO https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/amazon-sagemaker-codeserver-0.1.5.tar.gz
tar -xvzf amazon-sagemaker-codeserver-0.1.5.tar.gz

cd amazon-sagemaker-codeserver/install-scripts/notebook-instances
 
chmod +x install-codeserver.sh
chmod +x setup-codeserver.sh
sudo ./install-codeserver.sh
sudo ./setup-codeserver.sh

But at the end of the setup codeserver script I got an error:

+ systemctl restart jupyter-server
./setup-codeserver.sh: line 119: systemctl: command not found

After refreshing the page there is no option to launch VSCode anywhere. This is on a ml.t2.medium instance. Jupyterlab version 1.2.21.

Logs:

done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.8.4
  latest version: 22.11.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/ec2-user/SageMaker/.cs/conda/envs/codeserver_py39

  added / updated specs:
    - python=3.9


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _openmp_mutex-4.5          |            2_gnu          23 KB  conda-forge
    ca-certificates-2022.12.7  |       ha878542_0         143 KB  conda-forge
    ld_impl_linux-64-2.39      |       hcc3a1bd_1         675 KB  conda-forge
    libgcc-ng-12.2.0           |      h65d4601_19         931 KB  conda-forge
    libgomp-12.2.0             |      h65d4601_19         455 KB  conda-forge
    libsqlite-3.40.0           |       h753d276_0         791 KB  conda-forge
    libzlib-1.2.13             |       h166bdaf_4          64 KB  conda-forge
    ncurses-6.3                |       h27087fc_1        1002 KB  conda-forge
    openssl-3.0.7              |       h0b41bf4_1         2.5 MB  conda-forge
    pip-22.3.1                 |     pyhd8ed1ab_0         1.5 MB  conda-forge
    python-3.9.15              |hba424b6_0_cpython        21.0 MB  conda-forge
    readline-8.1.2             |       h0f457ee_0         291 KB  conda-forge
    setuptools-65.6.3          |     pyhd8ed1ab_0         619 KB  conda-forge
    tzdata-2022g               |       h191b570_0         106 KB  conda-forge
    wheel-0.38.4               |     pyhd8ed1ab_0          32 KB  conda-forge
    xz-5.2.6                   |       h166bdaf_0         409 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        30.3 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-2_gnu
  bzip2              conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
  ca-certificates    conda-forge/linux-64::ca-certificates-2022.12.7-ha878542_0
  ld_impl_linux-64   conda-forge/linux-64::ld_impl_linux-64-2.39-hcc3a1bd_1
  libffi             conda-forge/linux-64::libffi-3.4.2-h7f98852_5
  libgcc-ng          conda-forge/linux-64::libgcc-ng-12.2.0-h65d4601_19
  libgomp            conda-forge/linux-64::libgomp-12.2.0-h65d4601_19
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  libsqlite          conda-forge/linux-64::libsqlite-3.40.0-h753d276_0
  libuuid            conda-forge/linux-64::libuuid-2.32.1-h7f98852_1000
  libzlib            conda-forge/linux-64::libzlib-1.2.13-h166bdaf_4
  ncurses            conda-forge/linux-64::ncurses-6.3-h27087fc_1
  openssl            conda-forge/linux-64::openssl-3.0.7-h0b41bf4_1
  pip                conda-forge/noarch::pip-22.3.1-pyhd8ed1ab_0
  python             conda-forge/linux-64::python-3.9.15-hba424b6_0_cpython
  readline           conda-forge/linux-64::readline-8.1.2-h0f457ee_0
  setuptools         conda-forge/noarch::setuptools-65.6.3-pyhd8ed1ab_0
  tk                 conda-forge/linux-64::tk-8.6.12-h27826a3_0
  tzdata             conda-forge/noarch::tzdata-2022g-h191b570_0
  wheel              conda-forge/noarch::wheel-0.38.4-pyhd8ed1ab_0
  xz                 conda-forge/linux-64::xz-5.2.6-h166bdaf_0



Downloading and Extracting Packages
ca-certificates-2022 | 143 KB    | ############################################################################################################################## | 100% 
xz-5.2.6             | 409 KB    | ############################################################################################################################## | 100% 
ncurses-6.3          | 1002 KB   | ############################################################################################################################## | 100% 
libsqlite-3.40.0     | 791 KB    | ############################################################################################################################## | 100% 
pip-22.3.1           | 1.5 MB    | ############################################################################################################################## | 100% 
python-3.9.15        | 21.0 MB   | ############################################################################################################################## | 100% 
_openmp_mutex-4.5    | 23 KB     | ############################################################################################################################## | 100% 
readline-8.1.2       | 291 KB    | ############################################################################################################################## | 100% 
libzlib-1.2.13       | 64 KB     | ############################################################################################################################## | 100% 
openssl-3.0.7        | 2.5 MB    | ############################################################################################################################## | 100% 
libgomp-12.2.0       | 455 KB    | ############################################################################################################################## | 100% 
tzdata-2022g         | 106 KB    | ############################################################################################################################## | 100% 
libgcc-ng-12.2.0     | 931 KB    | ############################################################################################################################## | 100% 
setuptools-65.6.3    | 619 KB    | ############################################################################################################################## | 100% 
ld_impl_linux-64-2.3 | 675 KB    | ############################################################################################################################## | 100% 
wheel-0.38.4         | 32 KB     | ############################################################################################################################## | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate /home/ec2-user/SageMaker/.cs/conda/envs/codeserver_py39
#
# To deactivate an active environment, use
#
#     $ conda deactivate

[2022-12-29T17:42:19.284Z] info  Wrote default config file to ~/SageMaker/.xdg/config/code-server/config.yaml
Installing extensions...
Installing extension 'ms-python.python'...
Extension 'ms-python.python' v2022.20.1 was successfully installed.
grep: /home/ec2-user/SageMaker/.xdg/data/code-server/Machine/settings.json: No such file or directory
Installing extensions...
Installing extension 'ms-azuretools.vscode-docker'...
Extension 'ms-azuretools.vscode-docker' v1.23.3 was successfully installed.
sh-4.2$ sudo ./setup-codeserver.sh
+ CODE_SERVER_VERSION=4.5.2
+ CODE_SERVER_INSTALL_LOC=/home/ec2-user/SageMaker/.cs
+ XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ CREATE_NEW_CONDA_ENV=1
+ CONDA_ENV_LOCATION=/home/ec2-user/SageMaker/.cs/conda/envs/codeserver_py39
+ USE_CUSTOM_EXTENSION_GALLERY=0
+ EXTENSION_GALLERY_CONFIG='{{\"serviceUrl\":\"\",\"cacheUrl\":\"\",\"itemUrl\":\"\",\"controlUrl\":\"\",\"recommendationsUrl\":\"\"}}'
+ LAUNCHER_ENTRY_TITLE='Code Server'
+ PROXY_PATH=codeserver
+ LAB_3_EXTENSION_DOWNLOAD_URL=https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/sagemaker-jproxy-launcher-ext-0.1.3.tar.gz
+ INSTALL_LAB1_EXTENSION=1
+ LAB_1_EXTENSION_DOWNLOAD_URL=https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.1.5/amzn-sagemaker-jproxy-launcher-ext-jl1-0.1.4.tgz
+ export XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ XDG_DATA_HOME=/home/ec2-user/SageMaker/.xdg/data
+ export XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ XDG_CONFIG_HOME=/home/ec2-user/SageMaker/.xdg/config
+ export PATH=/home/ec2-user/SageMaker/.cs/bin/:/sbin:/bin:/usr/sbin:/usr/bin
+ PATH=/home/ec2-user/SageMaker/.cs/bin/:/sbin:/bin:/usr/sbin:/usr/bin
+ EXT_GALLERY_JSON=
+ '[' 0 -eq 1 ']'
+ JUPYTER_CONFIG_FILE=/home/ec2-user/.jupyter/jupyter_notebook_config.py
+ grep -q /home/ec2-user/SageMaker/.cs/bin /home/ec2-user/.jupyter/jupyter_notebook_config.py
+ cat
++ /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/jupyter-lab --version
+ JUPYTER_LAB_VERSION=1.2.21
+ sudo -u ec2-user -i
Collecting jupyter-server-proxy
  Downloading jupyter_server_proxy-3.2.2-py3-none-any.whl (36 kB)
Collecting simpervisor>=0.4
  Downloading simpervisor-0.4-py3-none-any.whl (5.7 kB)
Requirement already satisfied: aiohttp in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server-proxy) (3.8.1)
Collecting jupyter-server>=1.0
  Downloading jupyter_server-1.23.4-py3-none-any.whl (346 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 346.8/346.8 KB 13.1 MB/s eta 0:00:00
Collecting nbformat>=5.2.0
  Downloading nbformat-5.7.1-py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.2/77.2 KB 12.7 MB/s eta 0:00:00
Requirement already satisfied: jupyter-client>=6.1.12 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (6.1.12)
Requirement already satisfied: jupyter-core>=4.7.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (4.9.2)
Requirement already satisfied: terminado>=0.8.3 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (0.13.2)
Requirement already satisfied: prometheus-client in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (0.13.1)
Requirement already satisfied: Send2Trash in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (1.8.0)
Requirement already satisfied: tornado>=6.1.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (6.1)
Collecting argon2-cffi
  Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Requirement already satisfied: packaging in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (21.3)
Requirement already satisfied: pyzmq>=17 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (22.3.0)
Requirement already satisfied: websocket-client in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (0.59.0)
Requirement already satisfied: jinja2 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (3.0.3)
Collecting nbconvert>=6.4.4
  Downloading nbconvert-7.2.7-py3-none-any.whl (273 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 273.2/273.2 KB 33.8 MB/s eta 0:00:00
Requirement already satisfied: traitlets>=5.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-server>=1.0->jupyter-server-proxy) (5.1.1)
Collecting anyio<4,>=3.1.0
  Downloading anyio-3.6.2-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.6/80.6 KB 13.0 MB/s eta 0:00:00
Requirement already satisfied: attrs>=17.3.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (20.3.0)
Requirement already satisfied: aiosignal>=1.1.2 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (1.2.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (4.0.2)
Requirement already satisfied: asynctest==0.13.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (0.13.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (2.0.12)
Requirement already satisfied: typing-extensions>=3.7.4 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (4.1.1)
Requirement already satisfied: frozenlist>=1.1.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (1.3.0)
Requirement already satisfied: multidict<7.0,>=4.5 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (6.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from aiohttp->jupyter-server-proxy) (1.7.2)
Collecting sniffio>=1.1
  Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Requirement already satisfied: idna>=2.8 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from anyio<4,>=3.1.0->jupyter-server>=1.0->jupyter-server-proxy) (3.3)
Requirement already satisfied: python-dateutil>=2.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jupyter-client>=6.1.12->jupyter-server>=1.0->jupyter-server-proxy) (2.8.2)
Requirement already satisfied: markupsafe>=2.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (2.1.0)
Collecting tinycss2
  Downloading tinycss2-1.2.1-py3-none-any.whl (21 kB)
Requirement already satisfied: bleach in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (4.1.0)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 KB 20.1 MB/s eta 0:00:00
Collecting jupyterlab-pygments
  Downloading jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting nbclient>=0.5.0
  Downloading nbclient-0.7.2-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.0/72.0 KB 11.1 MB/s eta 0:00:00
Requirement already satisfied: importlib-metadata>=3.6 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (4.11.2)
Requirement already satisfied: pandocfilters>=1.4.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (1.5.0)
Requirement already satisfied: pygments>=2.4.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (2.11.2)
Requirement already satisfied: defusedxml in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (0.7.1)
Collecting mistune<3,>=2.0.3
  Downloading mistune-2.0.4-py2.py3-none-any.whl (24 kB)
Requirement already satisfied: jsonschema>=2.6 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from nbformat>=5.2.0->jupyter-server>=1.0->jupyter-server-proxy) (3.2.0)
Collecting fastjsonschema
  Downloading fastjsonschema-2.16.2-py3-none-any.whl (22 kB)
Requirement already satisfied: ptyprocess in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from terminado>=0.8.3->jupyter-server>=1.0->jupyter-server-proxy) (0.7.0)
Collecting argon2-cffi-bindings
  Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 KB 14.0 MB/s eta 0:00:00
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from packaging->jupyter-server>=1.0->jupyter-server-proxy) (3.0.7)
Requirement already satisfied: six in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from websocket-client->jupyter-server>=1.0->jupyter-server-proxy) (1.16.0)
Requirement already satisfied: zipp>=0.5 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from importlib-metadata>=3.6->nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (3.7.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jsonschema>=2.6->nbformat>=5.2.0->jupyter-server>=1.0->jupyter-server-proxy) (0.18.1)
Requirement already satisfied: setuptools in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from jsonschema>=2.6->nbformat>=5.2.0->jupyter-server>=1.0->jupyter-server-proxy) (60.9.3)
Collecting jupyter-core>=4.7.0
  Downloading jupyter_core-4.12.0-py3-none-any.whl (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 KB 13.8 MB/s eta 0:00:00
Collecting traitlets>=5.1
  Downloading traitlets-5.8.0-py3-none-any.whl (116 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.8/116.8 KB 16.4 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.0.1 in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from argon2-cffi-bindings->argon2-cffi->jupyter-server>=1.0->jupyter-server-proxy) (1.15.0)
Collecting soupsieve>1.2
  Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Requirement already satisfied: webencodings in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from bleach->nbconvert>=6.4.4->jupyter-server>=1.0->jupyter-server-proxy) (0.5.1)
Requirement already satisfied: pycparser in ./anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server>=1.0->jupyter-server-proxy) (2.21)
Installing collected packages: simpervisor, mistune, fastjsonschema, traitlets, tinycss2, soupsieve, sniffio, jupyterlab-pygments, jupyter-core, beautifulsoup4, argon2-cffi-bindings, anyio, nbformat, argon2-cffi, nbclient, nbconvert, jupyter-server, jupyter-server-proxy
  Attempting uninstall: mistune
    Found existing installation: mistune 0.8.4
    Uninstalling mistune-0.8.4:
      Successfully uninstalled mistune-0.8.4
  Attempting uninstall: traitlets
    Found existing installation: traitlets 5.1.1
    Uninstalling traitlets-5.1.1:
      Successfully uninstalled traitlets-5.1.1
  Attempting uninstall: jupyter-core
    Found existing installation: jupyter-core 4.9.2
    Uninstalling jupyter-core-4.9.2:
      Successfully uninstalled jupyter-core-4.9.2
  Attempting uninstall: nbformat
    Found existing installation: nbformat 5.1.3
    Uninstalling nbformat-5.1.3:
      Successfully uninstalled nbformat-5.1.3
  Attempting uninstall: nbconvert
    Found existing installation: nbconvert 5.6.1
    Uninstalling nbconvert-5.6.1:
      Successfully uninstalled nbconvert-5.6.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
notebook 5.7.11 requires nbconvert<6.0, but you have nbconvert 7.2.7 which is incompatible.
Successfully installed anyio-3.6.2 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 beautifulsoup4-4.11.1 fastjsonschema-2.16.2 jupyter-core-4.12.0 jupyter-server-1.23.4 jupyter-server-proxy-3.2.2 jupyterlab-pygments-0.2.2 mistune-2.0.4 nbclient-0.7.2 nbconvert-7.2.7 nbformat-5.7.1 simpervisor-0.4 sniffio-1.3.0 soupsieve-2.3.2.post1 tinycss2-1.2.1 traitlets-5.8.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5718  100  5718    0     0   5981      0 --:--:-- --:--:-- --:--:-- 1576k
Config option `kernel_spec_manager_class` not recognized by `InstallLabExtensionApp`.
yarn config v1.15.2
success Set "cache-folder" to "/tmp/yarncache".
Done in 0.03s.
[LabBuildApp] Searching ['/home/ec2-user/.jupyter', '/home/ec2-user/.local/etc/jupyter', '/home/ec2-user/anaconda3/envs/JupyterSystemEnv/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[LabBuildApp] Looking for jupyter_config in /etc/jupyter
[LabBuildApp] Looking for jupyter_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/etc/jupyter
[LabBuildApp] Loaded config file: /home/ec2-user/anaconda3/envs/JupyterSystemEnv/etc/jupyter/jupyter_config.json
[LabBuildApp] Looking for jupyter_config in /home/ec2-user/.local/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /home/ec2-user/.jupyter
[LabBuildApp] WARNING | Config option `kernel_spec_manager_class` not recognized by `LabBuildApp`.
[LabBuildApp] Looking for JupyterLab_config in /etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /home/ec2-user/.local/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /home/ec2-user/.jupyter
[LabBuildApp] JupyterLab 1.2.21
[LabBuildApp] Building in /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v14.18.3

[LabBuildApp] Building jupyterlab assets (build:prod)
[LabBuildApp] > node /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
|[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "nbdime-jupyterlab > [email protected]" has unmet peer dependency "codemirror@^5.0.0".
warning " > @jupyterlab/[email protected]" has unmet peer dependency "codemirror@^5.0.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 42.56s.

[LabBuildApp] > node /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
/[LabBuildApp] yarn run v1.15.2
$ /home/ec2-user/anaconda3/envs/JupyterSystemEnv/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
Done in 0.49s.

[LabBuildApp] > node /home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod
-[LabBuildApp] yarn run v1.15.2
$ ensure-max-old-space webpack --config webpack.prod.config.js
Hash: 4ad23b6a8c0fb208cfe6afbdb2b950813f5fe9516df6485fbe4237f9154e
Version: webpack 4.46.0
Child
    Hash: 4ad23b6a8c0fb208cfe6
    Time: 16059ms
    Built at: 12/29/2022 5:45:59 PM
                                                              Asset      Size  Chunks                                Chunk Names
               2.f4b81e2bc1963983ecc5.js.map?v=f4b81e2bc1963983ecc5  1.05 MiB       2  [emitted] [dev]               
                   2.f4b81e2bc1963983ecc5.js?v=f4b81e2bc1963983ecc5   869 KiB       2  [emitted] [immutable]  [big]  
               3.80d8e6cc8397ffebf731.js.map?v=80d8e6cc8397ffebf731   500 KiB       3  [emitted] [dev]               
                   3.80d8e6cc8397ffebf731.js?v=80d8e6cc8397ffebf731   425 KiB       3  [emitted] [immutable]  [big]  
               4.b9d6e5fd43159ea216bf.js.map?v=b9d6e5fd43159ea216bf   914 KiB       4  [emitted] [dev]               
                   4.b9d6e5fd43159ea216bf.js?v=b9d6e5fd43159ea216bf   750 KiB       4  [emitted] [immutable]  [big]  
               5.996e6d254152c9a96d99.js.map?v=996e6d254152c9a96d99   889 KiB       5  [emitted] [dev]               
                   5.996e6d254152c9a96d99.js?v=996e6d254152c9a96d99   720 KiB       5  [emitted] [immutable]  [big]  
               6.64052a7445962e5fc5af.js.map?v=64052a7445962e5fc5af   249 KiB       6  [emitted] [dev]               
                   6.64052a7445962e5fc5af.js?v=64052a7445962e5fc5af   209 KiB       6  [emitted] [immutable]         
                               674f50d287a8c48dc19ba404d20fe713.eot   162 KiB          [emitted]                     
               7.07aebb4cee80d7092240.js.map?v=07aebb4cee80d7092240  5.69 KiB       7  [emitted] [dev]               
                   7.07aebb4cee80d7092240.js?v=07aebb4cee80d7092240  4.27 KiB       7  [emitted] [immutable]         
                               912ec66d7572ff821749319396470bde.svg   434 KiB          [emitted]              [big]  
                             af7ae505a9eed503f8b8e6982036873e.woff2  75.4 KiB          [emitted]                     
                               b06871f281fee6b241d60582ae9369b9.ttf   162 KiB          [emitted]                     
                              fee66e712a8a08eef5805a46892932ad.woff  95.7 KiB          [emitted]                     
                                                         index.html  1.79 KiB          [emitted]                     
            main.a055d3449a3cb906400e.js.map?v=a055d3449a3cb906400e  84.9 KiB       0  [emitted] [dev]               main
                main.a055d3449a3cb906400e.js?v=a055d3449a3cb906400e  65.1 KiB       0  [emitted] [immutable]         main
    vendors~main.5b4292be22d35224a64e.js.map?v=5b4292be22d35224a64e  13.4 MiB       1  [emitted] [dev]               vendors~main
        vendors~main.5b4292be22d35224a64e.js?v=5b4292be22d35224a64e  11.5 MiB       1  [emitted] [immutable]  [big]  vendors~main
    Entrypoint main [big] = vendors~main.5b4292be22d35224a64e.js?v=5b4292be22d35224a64e vendors~main.5b4292be22d35224a64e.js.map?v=5b4292be22d35224a64e main.a055d3449a3cb906400e.js?v=a055d3449a3cb906400e main.a055d3449a3cb906400e.js.map?v=a055d3449a3cb906400e
    [0] multi whatwg-fetch ./build/index.out.js 40 bytes {0} [built]
    [/KN4] ./node_modules/@jupyterlab/filebrowser-extension/lib/index.js + 6 modules 127 KiB {1} [optional] [built]
        |    7 modules
    [31N0] ./node_modules/@jupyterlab/csvviewer-extension/lib/index.js + 5 modules 66.1 KiB {1} [optional] [built]
        |    6 modules
    [5pV8] ./node_modules/@jupyterlab/mathjax2-extension/lib/index.js + 1 modules 4.04 KiB {1} [optional] [built]
        |    2 modules
    [8943] ./node_modules/@jupyterlab/mainmenu-extension/lib/index.js + 10 modules 37 KiB {1} [optional] [built]
        |    11 modules
    [9fgM] ./build/imports.css 1.06 KiB {0} [built]
    [ANye] ./build/index.out.js 46.1 KiB {0} [built]
    [NHPb] ./node_modules/@jupyterlab/console-extension/lib/index.js + 6 modules 66.9 KiB {1} [optional] [built]
        |    7 modules
    [QP8U] ./node_modules/@jupyterlab/fileeditor-extension/lib/index.js + 1 modules 33.1 KiB {1} [optional] [built]
        |    2 modules
    [QbIU] ./node_modules/@jupyterlab/running-extension/lib/index.js + 1 modules 9.6 KiB {1} [optional] [built]
        |    2 modules
    [RMrj] ./node_modules/@jupyterlab/inspector-extension/lib/index.js + 1 modules 8.5 KiB {1} [optional] [built]
        |    2 modules
    [U33M] ./node_modules/@jupyterlab/logconsole-extension/lib/index.js + 6 modules 45.1 KiB {1} [optional] [built]
        |    7 modules
    [VYmV] ./node_modules/@jupyterlab/completer-extension/lib/index.js + 7 modules 61.6 KiB {1} [optional] [built]
        |    8 modules
    [ZPDT] ./node_modules/@jupyterlab/extensionmanager-extension/lib/index.js + 6 modules 43.4 KiB {1} [optional] [built]
        |    7 modules
    [dp0r] ./node_modules/@jupyterlab/git/lib/index.js + 113 modules 544 KiB {1} [optional] [built]
        |    114 modules
        + 1941 hidden modules
    
    WARNING in @material-ui/core
      Multiple versions of @material-ui/core found:
        3.9.4 ./~/sagemaker_session_manager/~/@material-ui/core from ./~/sagemaker_session_manager/~/@material-ui/core/styles/createMuiTheme.js
        4.12.3 ./~/@material-ui/core from ./~/@material-ui/core/esm/styles/index.js
    
    
    WARNING in @material-ui/utils
      Multiple versions of @material-ui/utils found:
        3.0.0-alpha.3 ./~/sagemaker_session_manager/~/@material-ui/utils from ./~/sagemaker_session_manager/~/@material-ui/utils/index.es.js
        4.11.2 ./~/@material-ui/utils from ./~/@material-ui/utils/esm/index.js
    
    
    WARNING in bn.js
      Multiple versions of bn.js found:
        4.12.0 ./~/bn.js from ./~/create-ecdh/browser.js
        5.2.0 ./~/browserify-rsa/~/bn.js from ./~/browserify-rsa/index.js
    
    
    WARNING in dom-helpers
      Multiple versions of dom-helpers found:
        3.4.0 ./~/dom-helpers from ./~/dom-helpers/util/hyphenateStyle.js
        5.2.1 ./~/@material-ui/core/~/dom-helpers from ./~/@material-ui/core/~/react-transition-group/esm/CSSTransition.js
    
    
    WARNING in entities
      Multiple versions of entities found:
        1.1.2 ./~/htmlparser2/~/entities from ./~/htmlparser2/lib/Tokenizer.js
        2.2.0 ./~/entities from ./~/entities/lib/encode.js
    
    
    WARNING in react-transition-group
      Multiple versions of react-transition-group found:
        2.9.0 ./~/react-transition-group from ./~/@blueprintjs/core/lib/esm/components/overlay/overlay.js
        4.4.2 ./~/@material-ui/core/~/react-transition-group from ./~/@material-ui/core/~/react-transition-group/esm/CSSTransition.js
    
    
    WARNING in readable-stream
      Multiple versions of readable-stream found:
        2.3.7 ./~/readable-stream from ./~/stream-browserify/index.js
        3.6.0 ./~/hash-base/~/readable-stream from ./~/hash-base/~/readable-stream/readable-browser.js
    
    
    WARNING in safe-buffer
      Multiple versions of safe-buffer found:
        5.1.2 ./~/safe-buffer from ./~/randombytes/browser.js
        5.2.1 ./~/hash-base/~/safe-buffer from ./~/hash-base/index.js
    
    
    WARNING in warning
      Multiple versions of warning found:
        3.0.0 ./~/sagemaker_session_manager/~/jss/~/warning from ./~/sagemaker_session_manager/~/jss/lib/utils/createGenerateClassName.js
        4.0.3 ./~/warning from ./~/sagemaker_session_manager/~/@material-ui/core/styles/withStyles.js
    
    Check how you can resolve duplicate packages: 
    https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle
    
    
    WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
    This can impact web performance.
    Assets: 
      912ec66d7572ff821749319396470bde.svg (434 KiB)
      vendors~main.5b4292be22d35224a64e.js?v=5b4292be22d35224a64e (11.5 MiB)
      2.f4b81e2bc1963983ecc5.js?v=f4b81e2bc1963983ecc5 (869 KiB)
      3.80d8e6cc8397ffebf731.js?v=80d8e6cc8397ffebf731 (425 KiB)
      4.b9d6e5fd43159ea216bf.js?v=b9d6e5fd43159ea216bf (750 KiB)
      5.996e6d254152c9a96d99.js?v=996e6d254152c9a96d99 (720 KiB)
    
    WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
    Entrypoints:
      main (11.6 MiB)
          vendors~main.5b4292be22d35224a64e.js?v=5b4292be22d35224a64e
          main.a055d3449a3cb906400e.js?v=a055d3449a3cb906400e
    
    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
        [KTNU] ./node_modules/html-loader!./templates/partial.html 703 bytes {0} [built]
        [YuTi] (webpack)/buildin/module.js 497 bytes {0} [built]
        [aS2v] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/template.html 1.27 KiB {0} [built]
        [yLpj] (webpack)/buildin/global.js 472 bytes {0} [built]
            + 1 hidden module
Child
    Hash: afbdb2b950813f5fe951
    Time: 2931ms
    Built at: 12/29/2022 5:45:46 PM
        Asset       Size  Chunks             Chunk Names
    index.css   85.9 KiB       0  [emitted]  index
     index.js  932 bytes       0  [emitted]  index
    Entrypoint index = index.css index.js
       4 modules
    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/@jupyterlab/theme-dark-extension/style/index.css:
        Entrypoint mini-css-extract-plugin = *
           56 modules
Child
    Hash: 6df6485fbe4237f9154e
    Time: 2967ms
    Built at: 12/29/2022 5:45:46 PM
        Asset       Size  Chunks             Chunk Names
    index.css   83.3 KiB       0  [emitted]  index
     index.js  932 bytes       0  [emitted]  index
    Entrypoint index = index.css index.js
       4 modules
    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/@jupyterlab/theme-light-extension/style/index.css:
        Entrypoint mini-css-extract-plugin = *
           57 modules
Done in 18.29s.

+ systemctl restart jupyter-server
./setup-codeserver.sh: line 119: systemctl: command not found

Missing IntelliSense or code auto completion

Hi,

We followed the tutorial and set up a working code-server instance running on Sagemaker Studio.
One very crucial part is to have IntelliSense or code auto completion when working with packages like pandas, etc.

However, this code completion seems not to work with loaded modules/packages like pandas or numpy but with internal defined functions/method/classes only.

Since code-server can not use pylance as a LSP, I made the change to "Jedi" as the default language server.
In my local set up (running code-server on a local machine) the auto-completion works out.

However, in my Sagemaker Studio hosted environment it does not. Code completion is quite essential for us (otherwise we can also stick to a text editor).

Therefore, I wanted to ask if you faced similar issues? The problem could be the environment code-server is running in (e.g., no access to the installed packages to make suggestions)

P.S. I ensured that the pandas package is installed in the used python interpreter as well as in the conda env the shell is running in

Installation fails on JS1

I'm trying out this solution but get the following error during install in Studio (JL1):

[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
warning @amzn/aws-hil-axis-jupyter-lab-extension > react-scripts > [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
error Couldn't find package "@amzn/sagemaker-ui-log-event@^3.30.0" required by "@amzn/aws-hil-axis-jupyter-lab-extension@file:../extensions/amzn-aws-hil-axis-jupyter-lab-extension-0.0.7.tgz" on the "npm" registry.

Error when adding notebook lifecycle configuration

Hi, Thanks for the great script!

When I tried to add lifecycle configuration on AWS CLI, error below is happened:

XXX:~/environment/amazon-sagemaker-codeserver/install-scripts/notebook-instances $ aws sagemaker create-notebook-instance-lifecycle-config \
>     --notebook-instance-lifecycle-config-name install-codeserver \
>     --on-start Content=$((cat setup-codeserver.sh || echo "")| base64) \
>     --on-create Content=$((cat install-codeserver.sh || echo "")| base64) 

Error parsing parameter '--on-create': Expected: '=', received: 'EOF' for input:
cyBSZXNlcnZlZC4KIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogTUlULTAKCiMhL2Jpbi9iYXNo

There is EOF in the middle of script, so I think quotation is needed when adding lifecycle configuration with AWS command:

aws sagemaker create-notebook-instance-lifecycle-config \
    --notebook-instance-lifecycle-config-name install-codeserver \
    --on-start Content="$((cat setup-codeserver.sh || echo "")| base64)" \
    --on-create Content="$((cat install-codeserver.sh || echo "")| base64)" 

Thanks,

Doesn't work for al2-v1 sagemaker-notebook?

The script works on an al2-v2 sagemaker notebook instance. However, the code-server launcher button never shows up for al2-v1 instance regardless putting it in lifecycle configuration or manually install it.

Interactive python window not launching on code cell execution

I used the medium blog to setup code-server in a notebook instance. Only change I made was using the latest release https://github.com/aws-samples/amazon-sagemaker-codeserver/releases/download/v0.2.0/amazon-sagemaker-codeserver-0.2.0.tar.gz.

I then installed the Jupyter extension through the gui and tried to execute a code cell. However the interactive python session just infinitely hangs. The same happens when i launch a notebook.

image

Any suggestion on how to debug this? My guess is pre installed jupyter config is different and vscode can't find an active server instance.

codeserver on sagemaker studio

Hi, codeserver seems to be running bare bone, similar to a system terminal. Is there anywhere we could run codeserver that uses computing resource with gpu such as pytorch-1-8-gpu-py3-ml-g4dn-xlarge?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.