diff --git a/colabcode/code.py b/colabcode/code.py index a32d401..8ba13c5 100644 --- a/colabcode/code.py +++ b/colabcode/code.py @@ -26,7 +26,6 @@ def __init__( self._mount = mount_drive self._code = code self._install_code() - self._install_extensions() self._start_server() if self._code: self._run_code() @@ -46,6 +45,7 @@ def _install_extensions(): for ext in EXTENSIONS: subprocess.run(["code-server", "--install-extension", f"{ext}"]) + def _start_server(self): if self.authtoken: ngrok.set_auth_token(self.authtoken) @@ -64,9 +64,9 @@ def _run_code(self): if self._mount and colab_env: drive.mount("/content/drive") if self.password: - code_cmd = f"PASSWORD={self.password} code-server --port {self.port} --disable-telemetry" + code_cmd = f"PASSWORD={self.password} code-server /content/drive/'My Drive' --port {self.port} --disable-telemetry" else: - code_cmd = f"code-server --port {self.port} --auth none --disable-telemetry" + code_cmd = f"code-server /content/drive/'My Drive' --port {self.port} --auth none --disable-telemetry" with subprocess.Popen( [code_cmd], shell=True,