Skip to content

blakeliu/sam-serving

Repository files navigation

sam-serving

PyPI - Version PyPI - Python Version


Table of Contents

Features

  • FastAPI for the Python backend API.

    • 🧰 SQLModel for the Python SQL database interactions (ORM).
    • 🔍 Pydantic, used by FastAPI, for the data validation and settings management.
    • 💾 PostgreSQL as the SQL database.
  • SAM Model for the Segmentation Moodel.

  • 🐋 Docker Compose for development and production.

  • 🔒 Secure password hashing by default.

  • 🔑 JWT (JSON Web Token) authentication.

  • 📫 Email based password recovery.

  • ✅ Tests with Pytest.

Build

hatchling

Installation

pip install sam-serving

Run Server

debug

python server.py --capacity 128 --timeout 3600000 --wait 10 --address 0.0.0.0 --port 8001 --debug --log-level debug

参数解释: https://mosecorg.github.io/mosec/reference/arguments.html

 --timeout TIMEOUT     Service timeout for one request (milliseconds)
                        (default: 3000)
 --wait WAIT           [deprecated] Wait time for the batcher to batch
                        (milliseconds) (default: 10)
 --log-level {debug,info,warning,error}
                        Configure the service log level (default: info)
 --dry-run             Dry run the service with provided warmup examples (if
                        any). This will omit the worker number for each stage.
                        (default: False)

open http://127.0.0.1:8001/openapi/swagger/

Reference

License

sam-serving is distributed under the terms of the MIT license.

About

sam python serving

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published