From d396298130a28bd9d4b5d82b03942406b74c07b7 Mon Sep 17 00:00:00 2001 From: Michael Pilosov Date: Sat, 16 May 2026 22:19:50 -0600 Subject: [PATCH] standalone build example --- build/Dockerfile | 18 +++++++++++------- build/compose.yml | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 336465c..ea74726 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -15,13 +15,17 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends python3 python3-pip ca-certificates \ && rm -rf /var/lib/apt/lists/* -# rmbg-as-a-service from TestPyPI; its deps from real PyPI; CUDA torch from the PyTorch index. -# pip prefers torch's +cu126 build because the local version label outranks the plain wheel. -RUN pip install \ - --index-url https://test.pypi.org/simple/ \ - --extra-index-url https://pypi.org/simple/ \ - --extra-index-url https://download.pytorch.org/whl/cu126 \ - "rmbg-as-a-service==0.0.2" hf-transfer +# Fetch only the rmbg-as-a-service wheel from TestPyPI (--no-deps), so TestPyPI never takes +# part in dependency resolution -- otherwise junk squatted packages there (e.g. "FASTAPI") +# outrank the real ones. Then install it with real PyPI as the index, CUDA torch from the +# PyTorch index (its +cu126 build outranks the plain wheel by local-version ordering). +RUN pip download --no-deps --dest /tmp/pkg \ + --index-url https://test.pypi.org/simple/ \ + "rmbg-as-a-service==0.0.2" \ + && pip install \ + --extra-index-url https://download.pytorch.org/whl/cu126 \ + /tmp/pkg/*.whl hf-transfer \ + && rm -rf /tmp/pkg EXPOSE 8000 CMD ["rmbg-as-a-service"] diff --git a/build/compose.yml b/build/compose.yml index aa3267c..d4bc747 100644 --- a/build/compose.yml +++ b/build/compose.yml @@ -7,7 +7,7 @@ services: image: mindthemath/rmbg:${TAG:-latest} container_name: rmbg ports: - - "${PORT:-8000}:8000" + - "${PORT:-8001}:8000" environment: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility