Dis.co Example Code
This repository contains a set of example codes that showcase the core features of Dis.co.
Download the code:
git clone https://github.com/discocompute/examples.git
Then, you will be able to explore the code locally.
We recommend you perform this step before installing Dis.co. The dependencies in your Python environment can significantly affect the performance as we will be resolving the same dependencies on all remote servers. Currently, Dis.co supports Mac OSX, Linux, and Windows with Python 3.6+ installed. For Windows users, you may want to configure Linux bash to execute the scripts locally.
#go to the example directory cd examples/ #install the python virtual environment python -m venv venv_disco source venv_disco/bin/activiate
Now, we install the Dis.co SDK and all libraries. This also comes with the CLI interface for Dis.co.
pip install disco --upgrade
Login & Authentication:
You have to login before running any of the examples. You can obtain your login by talking to our team. To login, simply type this command in the terminal and follow the on screen instructions.
After successfully login, you will be able to use the Dis.co's CLI to create or run jobs. To get more info, you can type this command to see the available commands.
Organization of the repository's directories
CLI - it contains examples related to ultities functions of Dis.co
SDK - it contains the functions related to SDK.
Web UI - contains sample codes that run on the Web UI.
Docker - contains build scripts for docker images
|Prime Number Finder||Showcasing how we can use Dis.co CLI|
|Python SDK & Custom Dockers||Learn how to run custom Docker images on Dis.co|
|Hello World||Hello world example on how to run Dis.co with CLI, Web UI, and SDK.|