Skip to content

Latest commit

 

History

History
110 lines (80 loc) · 5.65 KB

File metadata and controls

110 lines (80 loc) · 5.65 KB

VS Code

VS Code Remote SSH to older linux system

  • vs code server needs linux minimal requirements : kernel >= 4.18, glibc >=2.28, libstdc++ >= 3.4.25, binutils >= 2.29. If you do not meet these requirements you have two solutions

  • Solution A : Use old vs code version (downgrade actual version)

    • vs code version 1.96.4 supports glibc 2.17, you could downgrade vs code if you wish to connect to older linux system with glibc 2.17
  • Solution B :

    • Deploy vs code server patch mechanism
    • Tweak some settings
    • Connect with SSH Remote to the host

Solution B : How-to

  • Deploy vs code server patch mechanism

    • 1.connect with SSH to remote host

      cd $HOME
      git clone https://github.com/StudioEtrange/aistack
      
    • 2.build custom glibc runtime. Default parameters are suitable for rhel/centos 7 with glibc2.28 with gcc 8.5.0 for kernel 3.10

      cd $HOME/aistack/pool/scripts
      export NB_PROC="AUTO" # AUTO to use all your processor at build time
      ./build-custom-glibc-runtime.sh $HOME/custom-glibc2228-runtime
      
      # copy it in a shared folder to have to do this step only once by machine
      sudo cp -R $HOME/custom-glibc228-runtime /opt
      sudo chmod -R a+rx /opt/custom-glibc228-runtime
      
      # clean cache and build folder
      rm -rf $HOME/.build-custom-glibc-runtime
      
    • 3.install a hook to patch vs code server at each SSH connection

      cd $HOME/aistack/pool/scripts
      ./install-vscode-server-patch-hook.sh
      # To uninstall hook use : ./install-vscode-server-patch-hook.sh uninstall
      
  • Tweak Some settings

    • MANDATORY : VS Code / User Settings / Remote.SSH : uncheck Use Exec Server (OR in settings.json : "remote.SSH.useExecServer" : false)

    • If you have error with wget at connection wget unrecognized option "--no-config" because wget is too old

      • VS Code / User Settings / Remote.SSH : check Curl And Wget Configuration Files (OR in settings.json : "remote.SSH.useCurlAndWgetConfigurationFiles" : true)
    • git integration in VS Code may not work if you have an old git version (<2.x) in the PATH of your old linux system, you should update it or provide a new version in settings.json : "git.path" : "/opt/git/bin/git"

  • Connect with SSH Remote to the host

    • first time and at each new VS Code version you have to connect to the host first and it will fail because VS Code server is not yet patched
      • At this step you could close connection after first attempt to launch vs code server mentionning "GLIBC ERROR"
    • Then connect to the host and the patch will apply

Solution B : design notes

Custom LLM

VS Code Various Notes