Skip to content

Simpler configuration of options (like code-server version) #24

Description

@Riezebos

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions