migrate to uv + pyproject.toml
- root pyproject.toml replaces requirements.txt and requirements-worker.txt (worker = root + ffmpeg-python which root already had); test deps moved to [dependency-groups] dev - core/gpu/pyproject.toml replaces core/gpu/requirements.txt; uses [tool.uv.sources] to pin torch/torchvision and paddlepaddle-gpu to their CUDA index URLs, replacing the manual reinstall dance from old comments - Dockerfiles use uv sync --frozen against uv.lock for reproducible builds; PATH includes /app/.venv/bin so k8s manifests' bare uvicorn/celery commands resolve without wrapping in uv run - core/gpu/run.sh local mode now does uv sync + uv run python server.py; errors out cleanly if uv is missing
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Run the inference server
|
||||
#
|
||||
# Usage:
|
||||
# ./run.sh # Local (pip install -r requirements.txt first)
|
||||
# ./run.sh # Local: uv sync + run server.py (auto-installs/activates .venv)
|
||||
# ./run.sh docker # Docker (CPU)
|
||||
# ./run.sh docker-gpu # Docker with GPU
|
||||
# ./run.sh stop # Stop Docker container
|
||||
@@ -26,7 +26,12 @@ fi
|
||||
|
||||
case "${1:-local}" in
|
||||
local)
|
||||
python server.py
|
||||
if ! command -v uv >/dev/null 2>&1; then
|
||||
echo "uv not found. Install: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
||||
exit 1
|
||||
fi
|
||||
uv sync
|
||||
uv run python server.py
|
||||
;;
|
||||
docker)
|
||||
docker build -t mpr-inference .
|
||||
|
||||
Reference in New Issue
Block a user