Initializing a UnionML App#

UnionML ships with app templates that you can use to quickly set up a UnionML app. In this guide, you’ll learn a little bit more about the anatomy of a complete UnionML app project.

Basic App Template#

Let’s create a simple app that performs hand-written digits classification. UnionML ships with a command-line interface that you can use to quickly create an app:

unionml init my_app

You should see a new directory my_app with the following structure:

├── Dockerfile        # docker image for packaging up your app for deployment
├──         # app project readme
├──            # app script
├── data              # directory containing sample feature data
└── requirements.txt  # python dependencies for your app

Create a Virtual Environment#

Create a virtual environment for your app so that you can isolate its dependencies:

cd my_app
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

To make sure everything’s working as expected, we can run as a Python script:



Now that we’ve created our UnionML app, we can now go deeper into how it works by looking at how a Dataset object is defined.