Manual Setup Guide
Initial Steps
1. Fork the PictoPy repository: https://github.com/AOSSIE-Org/PictoPy
2. Open your Terminal (Linux/MacOS) or Powershell (Windows)
3. Clone your forked repository
4. Change to the repository directory
5. Add the main repository as "upstream"
Prerequisites
Install and Setup Miniconda
Before setting up the Python backend and sync-microservice, you need to have Miniconda installed and set up on your system.
-
Download and Install Miniconda:
- Visit the Miniconda installation guide.
- Follow the quickstart install instructions for your operating system.
- Make sure
condais available in your terminal after installation.
-
Verify Installation:
You should see the conda version number if installed correctly.
Tauri Frontend Setup
-
Install Tauri prerequisites based on your OS using this guide.
-
Navigate to the Frontend Directory: Open your terminal and use
cdto change directories: -
Install Dependencies:
-
Start the Tauri desktop app in development mode:
Python (FastAPI) Backend Setup Steps
Note: For backend setup, make sure that you have Miniconda installed. See the Prerequisites section above. Additionally, for Windows, make sure that you are using Powershell for the setup, not Command Prompt.
-
Navigate to the Backend Directory: Open your terminal and use
cdto change directories: -
Create a Conda Environment: Create a new conda environment with Python 3.12:
-
Activate the Conda Environment:
-
Install Dependencies: The
requirements.txtfile lists required packages. Install them using pip:Local development keeps the CPU-only
onnxruntimepackage. GPU acceleration is enabled per-platform in the release workflow, while the model recommendation step uses direct hardware detection instead of ONNX Runtime providers. -
Run the backend: To start the backend in development mode, run this command while you are in the backend folder and the conda environment is activated:
The server will start on
http://localhost:52123by default. In test mode, the server will automatically restart if any errors are detected or if source files are modified.
Sync-Microservice Setup Steps
Note: For sync-microservice setup, make sure that you have Miniconda installed. See the Prerequisites section above. Additionally, for Windows, make sure that you are using Powershell for the setup, not Command Prompt.
-
Navigate to the Sync-Microservice Directory: Open your terminal and use
cdto change directories: -
Create a Conda Environment: Create a new conda environment with Python 3.12:
-
Activate the Conda Environment:
-
Install Dependencies: The
requirements.txtfile lists required packages. Install them using pip: -
Run the sync-microservice: To start the sync-microservice in development mode, run this command while you are in the sync-microservice folder and the conda environment is activated:
The server will start on
http://localhost:52124by default. In development mode, the server will automatically restart if any errors are detected or if source files are modified.
Troubleshooting Common Issues
-
Missing System Dependencies: Some dependencies might need system-level libraries like
libGL.so.1, which is often needed by OpenCV. Install the appropriate packages based on your distribution:Debian/Ubuntu:
Other Systems: Consult your distribution's documentation for installation instructions.
-
gobject-2.0Not Found Error: Resolve this error by installinglibglib2.0-devon Debian/Ubuntu:For other systems, consult your distribution's documentation.