Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions docker/Dockerfile.clean
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,28 @@ RUN --mount=type=bind,from=wheels,source=/,target=/mnt/wheels \
filelock typing-extensions sympy networkx jinja2 fsspec numpy pillow \
&& pip3 install --break-system-packages \
/tmp/wheels/mori-*.whl \
/tmp/wheels/flydsl-*.whl \
&& pip3 install --break-system-packages \
/tmp/wheels/amd_aiter-*.whl \
&& rm -rf /tmp/wheels \
&& python3 -c "import torch; print(f'PyTorch {torch.__version__}, ROCm: {torch.version.hip}')" \
&& python3 -c "import triton; print(f'Triton {triton.__version__}')" \
&& python3 -c "import aiter; print('AITER OK')" \
&& python3 -c "import flydsl; print('FlyDSL OK')" \
&& pip3 show mori && echo "MORI wheel installed OK"

# ── 3. ATOM (from build context — pure Python, instant install) ──────
# ── 3. FlyDSL source (kernels, tests — for dev/profiling) ────────────
# The wheel installs the flydsl package, but having the source tree
# gives access to kernels/ and tests/ for benchmarking and profiling.
# The _mlir symlinks are pre-resolved in Dockerfile.wheels so editable
# installs work without the MLIR source tree.
RUN --mount=type=bind,from=wheels,source=/flydsl_src,target=/mnt/flydsl_src \
mkdir -p /app \
&& cp -r /mnt/flydsl_src /app/FlyDSL \
&& cd /app/FlyDSL \
&& FLIR_REBUILD=0 pip3 install --break-system-packages -e . \
&& python3 -c "import flydsl; print('FlyDSL editable OK')" \
&& python3 -c "from kernels.softmax_kernel import build_softmax_module; print('FlyDSL kernels OK')"

# ── 4. ATOM (from build context — pure Python, instant install) ──────
COPY . /app/ATOM
RUN cd /app/ATOM && pip3 install --break-system-packages -e . \
&& python3 -c "import atom; print('ATOM OK')"
Expand Down
16 changes: 16 additions & 0 deletions docker/Dockerfile.wheels
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@ RUN cd /build/FlyDSL \
&& cp dist/flydsl-*.whl /wheels/ \
&& ls -lh /wheels/flydsl-*.whl

# Dereference symlinks in _mlir so that editable installs work without
# the MLIR source tree. The build creates symlinks from the _mlir Python
# files (ir.py, dialects/*.py, etc.) into /build/llvm-project/…, which
# won't exist in the clean runtime image.
RUN cd /build/FlyDSL \
&& _mlir=".flir/build/python_packages/flydsl/_mlir" \
&& tmp_resolved="/tmp/_mlir_resolved" \
&& cp -rL "$_mlir" "$tmp_resolved" \
&& rm -rf "$_mlir" \
&& mv "$tmp_resolved" "$_mlir"

# Export the FlyDSL source tree (with resolved _mlir, kernels, tests)
# to /flydsl_src/ so Dockerfile.clean can optionally COPY it for dev use.
RUN cp -r /build/FlyDSL /flydsl_src \
&& rm -rf /flydsl_src/.git

# ── 7. Build MORI wheel ─────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
openmpi-bin libopenmpi-dev cython3 libdw1 \
Expand Down