Skip to content

Getting Started: Your First PyRun Project ๐Ÿš€ โ€‹

Welcome to PyRun! Now that you've completed the Account Setup and connected your AWS account, let's create your first project and run some code in the cloud.

PyRun offers two main pathways to get started, designed to cater to different needs and experience levels:

  • Workspaces: Ideal for users who want a flexible environment to write and run their own Python code using either Dask or Lithops. Workspaces provide pre-configured environments tailored to each tool, making it incredibly easy to get started with distributed computing.
  • Pipelines: Perfect for users who want to quickly explore real-world use cases and see PyRun in action. Pipelines are pre-built, end-to-end experiments that showcase the power of PyRun in practical scenarios.

Let's explore how to use each.

Option 1: Launching a Workspace ๐Ÿงฐ โ€‹

Workspaces provide a dedicated environment with a file browser, code editor, terminal, and execution controls.

  1. Navigate to Workspaces: In the PyRun sidebar, click "Workspaces".

  2. Create New Workspace: Click the "Create new workspace" button.

  3. Choose a Template: Select a starting template based on the primary tool you intend to use:

    • Dask Workspace: Pre-configured for parallel data analysis and ML with Dask. Includes dask and related libraries.
    • Lithops Workspace: Pre-configured for massively parallel function execution using Lithops. Includes lithops and its dependencies.

    Workspace Type Selection

    Choosing a template sets up the initial runtime environment and provides relevant example code.

  4. Name Your Workspace: Give it a descriptive name (e.g., my-data-analysis, lithops-simulation).

  5. Launch Workspace: Click "Create". PyRun provisions the workspace environment, which runs within your PyRun account, but job execution happens on your AWS account.

Inside Your Workspace:

  • example.py: This file contains example code tailored to your chosen framework (Lithops or Dask). It's a great starting point for understanding how to structure your code for PyRun. Open it up and take a look!

  • .pyrun/environment.yml: This file defines the Conda environment for your workspace. It lists all the necessary Python packages (both pip and conda packages) to run your code, ensuring you have all the dependencies you need.

    INFO

    You can modify environment.yml to install additional packages or customize your environment. See Customizing Your Runtime for details.

  • File Browser: You can create, edit, and upload files directly within your workspace.

  • Terminal access: A terminal that allow you to run your python files or install packages.

  • Launch Button: Launch the example.py code.

Run Your First Workspace Job:

  1. Open example.py: Familiarize yourself with the example code.
  2. Click "Run": This will execute the example.py script using the chosen framework (Lithops or Dask) and your configured environment.

2. Exploring Pipelines: Real-World Examples in Seconds ๐Ÿš€ โ€‹

Pipelines offer a quick and easy way to experience PyRun in action with pre-built, real-world experiments.

  1. Go to the Pipelines Page: Click on "Pipelines" in the PyRun sidebar.

  2. Browse Available Pipelines: You'll see a list of available pipelines, each representing a different use case or scenario.

  3. Select a Pipeline: Choose a pipeline that interests you and click on it to view more details.

  4. Launch Pipeline: Click the "Launch Pipeline" button. PyRun will automatically set up and execute the pipeline in your AWS account.

    Pipeline Selection

3. Pipeline Execution and Monitoring๐Ÿ“Š โ€‹

Once launched, you can monitor the progress of your pipeline in real-time using PyRun's built-in monitoring tools. You can track resource usage, view logs, and gain insights into the pipeline's execution.

TIP

Real-Time Insights! PyRun provides comprehensive Real-Time Monitoring for both workspaces and pipelines. Keep an eye on your jobs, track performance, and optimize your workflows.

4. Customize Your Environment (Optional) โ€‹

Need additional packages? No problem!

  • Customizing Your Runtime: Learn how to modify the environment.yml file to install your own dependencies and tailor the environment to your specific needs.

Important Note: AWS Account Usage โ€‹

Remember, all resources used within your PyRun workspace (compute, storage, etc.) are hosted and billed through your connected AWS account. PyRun provides the platform and automation, but the actual resource consumption happens within your AWS account. This gives you full control and transparency over your costs.

Next Steps โ€‹

You've launched your first PyRun project! Now you can:

  • Modify example.py in your workspace and run your own code.
  • Explore the different Pipelines for inspiration.
  • Dive deeper into using Lithops or Dask with PyRun.
  • Learn about Runtime Management to add custom packages.
  • Understand the Basic Workflow for developing in PyRun.

Happy computing! Have questions as you explore? Join the conversation on our Discord Server.