Skip to content

🐳 Enhancement: Add Dockerized Development Setup for PictoPy #1173

@Devnil434

Description

@Devnil434

🚀 Problem Statement

Currently, setting up the PictoPy development environment requires:

  • Installing Python and managing virtual environments
  • Installing Node.js and frontend dependencies
  • Configuring environment variables manually
  • Ensuring correct versions of ONNX Runtime, SQLite, etc.
  • Running backend and frontend separately

This makes onboarding difficult for new contributors and increases the chances of environment-related issues.


💡 Proposed Solution

Create a Dockerized development environment using:

  • Dockerfile for:
    • Python backend
    • Frontend (Node + Tauri)
  • docker-compose.yml to orchestrate:
    • Backend service (FastAPI)
    • Frontend service
    • Optional: SQLite volume mapping
  • Environment configuration via .env file

📦 Proposed Architecture

docker-compose

├── backend (Python + FastAPI + ML models)

├── frontend (React + Tauri)

└── volumes:
├── database
└── uploaded images



🎯 Goals

  • One command setup:
docker-compose up --build

Consistent development environment across:

Windows
macOS
Linux

  • Simplify contributor onboarding
  • Reduce environment-specific bugs

##🛠️ Implementation Plan

1️⃣ Backend Dockerfile

  • Use official Python image
  • Install dependencies from requirements.txt
    -Expose FastAPI port
  • Set working directory
  • Handle ONNX runtime dependencies

2️⃣ Frontend Dockerfile

  • Use Node base image
  • Install dependencies
  • Run development server
  • Map required ports

3️⃣ docker-compose.yml

  • Define services
  • Add volume mounts
  • Add environment variables
  • Configure networking

4️⃣ Documentation

  • Update README.md with:
  • Docker setup instructions
  • Development workflow
  • Troubleshooting tips

✅ Acceptance Criteria

  • Project can run with a single Docker command
  • No manual dependency installation required
  • Backend and frontend communicate successfully
  • SQLite data persists via Docker volume
  • Documentation is clear and complete

🧪 Testing Plan

  • Test on Windows
  • Test on macOS
  • Test on Linux
  • Verify image indexing works inside container
  • Verify database persistence

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions