-
⚡ 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.
pip install sam-serving
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/
sam-serving
is distributed under the terms of the MIT license.