Skip to content

RetaiL: A Simulation Framework for Monitoring and Reducing Food Waste in Grocery Stores

License

Notifications You must be signed in to change notification settings

samijullien/airlab-retail

Repository files navigation

RetaiL

Overview

RetaiL is a library aimed at improving experimentation in a grocery store context, to reduce generated waste. We think it is a great addition for both reinforcement learning and supply chain researchers, but also to data scientists working in retail environments.

We presented part of RetaiL as a demo for NeurIPS 2020.

We design RetaiL around two main components:

We additionally provide four usage examples of RetaiL:

Requirements

This application was written using Python 3.7 and R, including the R package copula to generate items.

It was packaged using Docker 19.03.13 for easy setup and usage regardless of operating system.

Memcached requires libmemcached. On Mac OS:

brew install libmemcached

Usage

You can visit the running app at: http://airlab-retail.northeurope.azurecontainer.io/

Local Development Server

With Docker Compose:

docker-compose up

With Docker but no Docker Compose:

# web app
docker pull shubhaguha/retail:latest
docker run -ti --rm --name retail-web -p 80:80 shubhaguha/retail:latest

# external cache server
docker run -ti --rm --name retail-memcached -p 11211:11211 memcached

# network connecting these two running containers
docker network create retail-network
docker network connect retail-network retail-web
docker network connect retail-network retail-memcached

Without Docker or Docker Compose:

# Checkout this git repository
git clone https://github.com/samijullien/airlab-retail.git
cd airlab-retail

# Use a virtual environment
python3 -m venv env
source env/bin/activate

# Install and run
python3 setup.py install
python3 -m retail

View the grocery store simulation in your web browser at http://localhost:8050/.

Development

Build

To increment a version:

  • Update the version in setup.py.
  • Create a git tag with the same version, e.g. 0.1.1.
  • Build and publish Docker image.

Docker commands:

docker build . -t shubhaguha/retail:${VERSION} -t shubhaguha/retail:latest
docker push shubhaguha/retail:${VERSION}
docker push shubhaguha/retail:latest

Deploy

This application is deployed in Microsoft Azure using Container Groups.

To deploy:

./deploy/script.sh create

To check deployment status:

./deploy/script.sh show

To view logs:

./deploy/script.sh logs

About

RetaiL: A Simulation Framework for Monitoring and Reducing Food Waste in Grocery Stores

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published