|
|
|
## Installation using Anaconda
|
|
|
|
|
|
|
|
In this section, we provide instructions on how the user can build the python Flask server of the Forecasting Toolbox from scratch, using the Anaconda virtual environment. The Forecasting Toolbox is developed to run on Unix and Windows systems with python 3.6.* innstalled. We suggest installing python via the Anaconda distribution as it provides an easy way to create a virtual environment and install dependencies. The configuration steps needed, are described below:
|
|
|
|
|
|
|
|
- **Step 1**: Download the latest [Anaconda distribution](https://www.anaconda.com/distribution/) and follow the installation steps described in the [Anaconda documentation](https://docs.anaconda.com/anaconda/install/windows/).
|
|
|
|
- **Step 2**: Open Anaconda cmd. Running Anaconda cmd activates the base environment. We need to create a specific environment to run Forecasting Toolbox. Create a new python 3.6.4 environment by running the following command:
|
|
|
|
```bash
|
|
|
|
conda create --name forecaster_toolbox python=3.6.4
|
|
|
|
```
|
|
|
|
This command will result in the creation of a conda environment named *forecaster_toolbox*. In order to activate the new environment, execute the following command:
|
|
|
|
```bash
|
|
|
|
conda activate forecaster_toolbox
|
|
|
|
```
|
|
|
|
- **Step 3**: Once your newly created environment is active, install the needed libraries by executing the following commands:
|
|
|
|
```bash
|
|
|
|
conda install -c anaconda numpy pandas scikit-learn waitress flask flask-cors pymongo
|
|
|
|
```
|
|
|
|
and
|
|
|
|
```bash
|
|
|
|
conda install -c saravji pmdarima
|
|
|
|
```
|
|
|
|
- **Step 4**: To start the server, use the command promt inside the active environment and execute the commands described in section [Run Server](run server).
|
|
|
|
|
|
|
|
## Installation using Docker Build
|
|
|
|
|
|
|
|
In this section, we provide instructions on how the user can build from scratch a new Docker Image that contains the python Flask app and the Conda environment of the of the Forecasting Toolbox.
|
|
|
|
|
|
|
|
- **Step 1**: Download and install [Docker](https://www.docker.com/)
|
|
|
|
- **Step 2**: Clone the latest Forecasting Toolbox version and navigate to the home directory. You should see a *DockerFile* and a *environment.yml* file, which contains the Conda environment dependencies.
|
|
|
|
- **Step 3**: In the home directory of the Forecasting Toolbox, open cmd and execute the following command:
|
|
|
|
```bash
|
|
|
|
sudo docker build -t forecaster_toolbox .
|
|
|
|
```
|
|
|
|
This command will result in the creation of a Docker Image named *forecaster_toolbox*. In order to create a Docker Container from this image, execute the following command:
|
|
|
|
```bash
|
|
|
|
sudo docker run -it --name forecaster-toolbox-test -p 5000:5000 forecaster_toolbox
|
|
|
|
```
|
|
|
|
This command will generate and run a Docker Container named *forecaster-toolbox-test* in interactive session mode, i.e. it will open a command promt inside the Container.
|
|
|
|
- **Step 4**: To start the server, use the command promt inside the running Container and execute the commands described in section [Run Server](run server).
|
|
|
|
|
|
|
|
## Installation using a pre-built Docker Image from DockerHub
|
|
|
|
|
|
|
|
Alternatively, you can skip the process of building the Forecasting Toolbox image from scratch by using the pre-existing image available on [DockerHub](https://hub.docker.com/r/tsoukj/forecaster_toolbox). We highly recommend new users to select this option of installing the SDK4ED Forecasting Toolbox, as it constitutes the easiest way.
|
|
|
|
|
|
|
|
- **Step 1**: Download and install [Docker](https://www.docker.com/)
|
|
|
|
- **Step 2**: Open cmd and execute the following command:
|
|
|
|
```bash
|
|
|
|
docker pull tsoukj/forecaster_toolbox
|
|
|
|
```
|
|
|
|
This command will download the latest Docker Image named *forecaster_toolbox* from DockerHub. In order to create a Docker Container from this image, execute the following command:
|
|
|
|
```bash
|
|
|
|
sudo docker run -it --name forecaster-toolbox-test -p 5000:5000 forecaster_toolbox
|
|
|
|
```
|
|
|
|
This command will generate and run a Docker Container named *forecaster-toolbox-test* in interactive session mode, i.e. it will open a command promt inside the Container.
|
|
|
|
- **Step 3**: To start the server, use the command promt inside the running Container and execute the commands described in section [Run Server](run server). |
|
|
|
\ No newline at end of file |