Skip to main content

Run python code on remote servers

Project description

pip install labml_remote
cd [PATH TO YOUR PROJECT FOLDER]
labml_remote --init
# Give it SSH credentials
labml_remote python [PATH TO YOU PYTHON CODE] [ARGUMENTS TO YOUR PYTHON CODE]

labml_remote --init asks for your SSH credentials and creates two files .remote/configs.yaml and .remote/exclude.txt. .remote/configs.yaml keeps the remote configurations for the project. Here’s a sample .remote/configs.yaml:

hostname: ec2-18-219-46-175.us-east-2.compute.amazonaws.com
name: labml_samples
private_key: .remote/private_key
username: ubuntu

.remote/exclude.txt is like .gitignore - it specifies the files and folders that you dont need to sync up with the remote server. The excludes generated by labml_remote --init excludes things like .git, .remote, logs and __pycache__. You should edit this if you have things that you don’t want to be synced with your remote computer.

labml_remote python ... will run your code in the remote computer. It does a bunch of things and you should be able to see the progress in the console. It sets up miniconda if it’s not already installed and create a new environment for the project. Then it creates a folder by the name of the project inside home folder and syncs up the contents of your local folder. It syncs using rsync so subsequent sysncs should only need to send the changes. Then it installs packages from requirements.txt or from pipenv if a Pipfile is found. Then it runs your python file. It will use pipenv if a Pipfile is present. The outputs of your program will be streamed to the console.

Hope this helps!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labml_remote-0.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

labml_remote-0.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file labml_remote-0.0.1.tar.gz.

File metadata

  • Download URL: labml_remote-0.0.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for labml_remote-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7fab92820825dd403491a1e34d9198b89c2e43e71deb3218b31ea8ee1fdfb538
MD5 6b0e374b833f473e3638a0dca4cc86ca
BLAKE2b-256 30117167d62ac629d641b2c9d58b20f3cab1bad4a7ed8a45898bf1c2200f23bd

See more details on using hashes here.

File details

Details for the file labml_remote-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: labml_remote-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for labml_remote-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 552d5c53e05bb83e6ccd9f4554ee10fb60b17c5e73d96b8b6b3bf75a3e0e7960
MD5 351753bf54936c628494659fdf4fc0ef
BLAKE2b-256 78b9e2ccf6ca1dee5c27f31b8f152f4470b3e01e6ea3763985390b608e933fcb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page