Spaces:
Sleeping

Terrarioum-AI / Dockerfile.reactor
papy61's picture
Installation AlayaWorld - Terrarioum
197575c verified
Raw History Blame Contribute Delete
1.42 kB
# syntax=docker/dockerfile:1
# Serving image for the Reactor adapter in reactor/. Built from the repository
# root, because the adapter imports alaya/, ltx2/, and inference/ directly:
#
# reactor build -f Dockerfile.reactor
FROM python:3.12-slim
WORKDIR /app
# Git clones the two pinned code dependencies at model load. TorchInductor
# compiles small host-side extensions for the selected CUDA device.
RUN apt-get update \
&& apt-get install --yes --no-install-recommends build-essential git \
&& rm -rf /var/lib/apt/lists/*
# Keep the expensive dependency layer reusable across code-only edits.
COPY reactor/requirements.txt reactor/requirements-flash-attn.txt /app/
# Three passes because FlashAttention 4 and Reactor Runtime cannot be resolved
# together: the CuTe DSL caps protobuf below 7 and the runtime needs 7.35. The
# attention wheels land second, then the protobuf the runtime needs goes back on
# top — verified to serve both. reactor/requirements-flash-attn.txt has the detail.
RUN python -m pip install --no-cache-dir -r /app/requirements.txt \
&& python -m pip install --no-cache-dir -r /app/requirements-flash-attn.txt \
&& python -m pip install --no-cache-dir --no-deps "protobuf==7.35.1"
COPY . /app/
ENV PYTHONUNBUFFERED=1 \
HOST=0.0.0.0 \
PORT=8080 \
PYTORCH_ALLOC_CONF=expandable_segments:True
EXPOSE 8080
ENTRYPOINT ["python", "-m", "reactor_runtime.serve"]