This repository holds the source code for the backend of the VisionMD Desktop App. Below is documentation for developing, building and testing the backend server of VisionMD.
- Anaconda (or Miniconda)
- Python 3.10
Follow the below steps to get the server running for development.
git clone https://github.com/mea-lab/VisionMD-DesktopApp-BackEnd.git
cd VisionMD-DesktopApp-BackEndUse the provided environment.yml file to recreate the exact development environment. Make sure you use the environment according to your OS.
conda env create -f environment_{OS}.yml
conda activate VisionMDDownload the models using the scripts found in ./scripts.
./scripts/get_models.sh # For Linux / MacOS
./scripts/get_models.bat # For Windowspython manage.py runserverYou must have the backend Django server running on 127.0.0.1:8000. After, run the frontend repository located at https://github.com/mea-lab/VisionMD-DesktopApp-FrontEnd. Follow the instruction in the README to run the frontend for developement. After setup, the frontend will now connect to your backend.
To stop the development server, press Ctrl + C in the terminal where the server is running.
This documents internal testing for the VisionMD Desktop App using static web assets.
Follow the README in https://github.com/mea-lab/VisionMD-DesktopApp-FrontEnd to build the static web assets. After transferring the static web assets to the root of this repository, rename it to dist.
python manage.py runserverIn your browser (Chrome is recommended), navigate to:
http://localhost:8000/. The app will be available within the browser.
This section documents building the Pyinstaller executable for the production installers for Windows, Linux and MacOS. The Pyinstaller executable has to be packaged with the frontend repository to create a proper installer.
./scripts/build_windows.sh # For Windows
./scripts/build_linux.sh # For Linux
./scripts/build_mac.sh # For MacOSRun the appropriate script for your OS. This will build a onedir Pyinstaller executable at ./pyinstaller_builds/serve_{OS}. Transfer this executable to the ./pyinstaller_builds/ directory in the frontend repository. The frontend repository is now ready for building a production installer.