n1klaus / otree

oTree is an open-source and online software for implementing interactive experiments in the laboratory, online, the field or combinations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup

# Setup virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Install otree
pip3 install -U otree
# Create project
otree startproject app
cd app

# Create application
otree startapp mini_ultimatum
otree startapp exit_survey

# Run server
otree devserver

Testing the application locally

# Create virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Change directory to app
cd app
# Install requirements
python3 -m pip install -U -r requirements.txt
# Run server
otree devserver

Setup Docker container with Alpine Linux and Python

# Building the image using Dockerfile
docker build -f Dockerfile . --tag otree_image

docker run -it --rm \
    --name otree_container \
    --publish 8000:8000 \
    -d otree_image

docker exec -it otree_container bash

References

About

oTree is an open-source and online software for implementing interactive experiments in the laboratory, online, the field or combinations


Languages

Language:Python 51.4%Language:HTML 36.7%Language:Shell 9.0%Language:Dockerfile 2.4%Language:Procfile 0.5%