Content
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.
- 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
- 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/amd64If you see a version number displayed, then Podman is successfully installed on your local computer. Now you can create an run containers.
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 originWe 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.
To build the container image use this script:
$ sh bin/build_training.shTo Run the container use this script:
$ sh bin/start_training.shAfter the training is completed you must see a group of *.pkl files inside containr_data/trained_models
To build the container image use this script:
$ sh bin/build_api.shTo Run the container use this script:
$ sh bin/start_api.shThen 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.
Use this podman commands to list images:
$ podman image listAnd containers:
$ podman ps -aUse 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>