Skip to content

Conversation

@pavitrashah
Copy link

Added a region argument to ColabCode class so users can choose their closest location and have lower latency. And added description and example of that in README.

The available regions are:

us - United States (default)
eu - Europe
ap - Asia/Pacific
au - Australia
sa - South America
jp - Japan
in - India

subprocess.run(["code-server", "--install-extension", f"{ext}"])

def _start_server(self):
conf.get_default().region = self.region
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please pass region in options here: url = ngrok.connect(addr=self.port, options={"bind_tls": True})

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried it out but it does not work by doing that. That's why I have used this method as mentioned in pyngrok docs (https://pyngrok.readthedocs.io/en/latest/#setting-the-region).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Sir, Could you please review this? I've tried the change you mention but it doesn't seem to work.

import nest_asyncio
import uvicorn
from pyngrok import ngrok
from pyngrok import ngrok, conf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Contributor

@misalraj misalraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for 'Kaggle & Colab', So, by default US reason is fine now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants