Skip to content
AgentAhmedPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Table of contents

Content

Run containers on local computer

Install podman

Podman is a tool for managing containers on a Linux system. In this guide, we will provide a link to a tutorial on how to install Podman on a local computer running Linux.

  1. Prerequisites

Before you begin, ensure that your computer meets the following requirements:

  • Running a Linux-based operating system or WSL
  • Has access to the internet
  • Has root or sudo access
  1. Installation

To install Podman on your local computer, please follow this link How to Install Podman

Install Podman, and verify that it's installed.

$ podman version
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.17.3
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

If you see a version number displayed, then Podman is successfully installed on your local computer. Now you can create an run containers.

Getting started

If you already have a container engine installed like podman, you just need to clone the repository and select the branch you want to use. At this moment everything is in dev.

$ git clone https://dagshub.com/Omdena/CogniFit.git
$ cd CogniFit/
$ git fetch -a
$ git checkout -b dev origin/dev
$ git pull origin

We need to create a common directory structure to share data and models between training container and api container.

Cognifit/
├── container_data
│   ├── incomming
│   │   ├── clean
│   │   └── raw
│   │       ├── games_and_tasks_by_skill.xlsx
│   │       ├── games_rating_by_user.csv
│   │       ├── games_rating_overall.csv
│   │       ├── games_skills.csv
│   │       └── training_sessions_cognifit.csv
│   ├── trained_models
│   └── training_temp

There are several scripts inside the bin folder that helps to create images and containers to test.

Training container

To build the container image use this script:

$ sh bin/build_training.sh

To Run the container use this script:

$ sh bin/start_training.sh

After the training is completed you must see a group of *.pkl files inside containr_data/trained_models

API container

To build the container image use this script:

$ sh bin/build_api.sh

To Run the container use this script:

$ sh bin/start_api.sh

Then you can test that the API is running with this link link

You have access to the OpenAPI docs in this link. You can test here the hybrid model and every model independently.

Stop and delete containers and images

Use this podman commands to list images:

$ podman image list

And containers:

$ podman ps -a

Use this podman commands to stop and remove containers that you don't want to keep:

$ podman stop <containerID>
$ podman rm <containerID>

And to remove images:

$ podman image rm <imageID>

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages