1. Fork the PictoPy repository: https://github.com/AOSSIE-Org/PictoPy
git clone https://github.com/yourUsername/PictoPycd PictoPygit remote add upstream https://github.com/AOSSIE-Org/PictoPyBefore 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:
conda --version
You should see the conda version number if installed correctly.
-
Install Tauri prerequisites based on your OS using this guide.
-
Navigate to the Frontend Directory: Open your terminal and use
cdto change directories:cd frontend -
Install Dependencies:
npm install
-
Start the Tauri desktop app in development mode:
npm run tauri dev
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:cd backend -
Create a Conda Environment: Create a new conda environment with Python 3.12:
conda create -p .env python=3.12
-
Activate the Conda Environment:
conda activate ./.env
-
Install Dependencies: The
requirements.txtfile lists required packages. Install them using pip:pip install -r requirements.txt
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:
fastapi dev --port 52123
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.
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:cd sync-microservice -
Create a Conda Environment: Create a new conda environment with Python 3.12:
conda create -p .sync-env python=3.12
-
Activate the Conda Environment:
conda activate ./.sync-env
-
Install Dependencies: The
requirements.txtfile lists required packages. Install them using pip:pip install -r requirements.txt
-
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:
fastapi dev --port 52124
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.
-
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:
sudo apt update sudo apt install -y libglib2.0-dev libgl1-mesa-glx
Other Systems: Consult your distribution's documentation for installation instructions.
-
gobject-2.0Not Found Error: Resolve this error by installinglibglib2.0-devon Debian/Ubuntu:sudo apt install -y libglib2.0-dev pkg-config
For other systems, consult your distribution's documentation.
