-
Notifications
You must be signed in to change notification settings - Fork 5
1. Set up and deploy CROP locally or on Azure
Prepare the files
-
Download the Crop Repository to your local machine or VM.
-
Download the CROP_unity_js Repository to get the 3D model (optional).
-
Copy the contents of the CROP_unity_js repository and paste them within the downloaded CROP project inside the
CROP\webapp\app\base\static\structures\CROP_unity_js
folder (optional). -
Navigate to the CROP.secrets folder and create a copy of the template_crop.sh (for mac) or the template_crop_windows.sh (for windows). Rename it to crop.sh.
Set up the environmental variables
-
Open the crop.sh in an editor such as notepad and replace the python path with the path to your CROP folder and the <<> with the appropriate passwords and keys as set up or given to you.
-
Save the crop.sh and run it as an administrator to save the environmental variables. Make sure that the env variables are saved ok.
Set up Python
-
Install Python v. 3.7 or higher.
-
Create a new Python environment (e.g. if you are using conda type
conda create --name cropenv
). -
Activate your new virtual environment. e.g.
conda activate cropenv
. -
cd to the directory where requirements.txt is located.
-
Install the requirements from the requirements.txt file. To do that run:
pip install -r requirements.txt
in your shell. You can check if all the requirements are installed properly using the commandpip freeze
and compare the list to the requirements.txt.
Run the webapp
-
cd to the CROP\webapp directory
-
Run flask using:
flask run --host=0.0.0.0 --port 5000
-
open your browser and call the local host e.g.
http://localhost:5000/
to view the webapp
How to use CROP