Spaces:
Sleeping
Sleeping
Commit ·
31d5d76
1
Parent(s): 5e87652
pytorch-mlir
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
|
@@ -19,20 +19,17 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
| 19 |
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
| 20 |
apt-get -y update && apt-get install -y mlir-18-tools llvm-18
|
| 21 |
|
| 22 |
-
# Install
|
| 23 |
-
RUN --mount=type=cache,target=/root/.cache pip install --break-system-packages torch
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
WORKDIR /opt/torch-mlir
|
| 29 |
-
RUN python3 -m pip install -e . --user
|
| 30 |
|
| 31 |
# Add PyTorch-MLIR tools to PATH
|
| 32 |
ENV PATH="/root/.local/bin:${PATH}"
|
| 33 |
|
| 34 |
# Verify installations
|
| 35 |
-
RUN
|
| 36 |
mlir-opt --version && \
|
| 37 |
llvm-as --version
|
| 38 |
|
|
|
|
| 19 |
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
| 20 |
apt-get -y update && apt-get install -y mlir-18-tools llvm-18
|
| 21 |
|
| 22 |
+
# Install pytorch-mlir
|
|
|
|
| 23 |
|
| 24 |
+
RUN pip install --break-system-packages --pre torch-mlir torchvision \
|
| 25 |
+
--extra-index-url https://download.pytorch.org/whl/nightly/cpu \
|
| 26 |
+
-f https://github.com/llvm/torch-mlir-release/releases/expanded_assets/dev-wheels
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Add PyTorch-MLIR tools to PATH
|
| 29 |
ENV PATH="/root/.local/bin:${PATH}"
|
| 30 |
|
| 31 |
# Verify installations
|
| 32 |
+
RUN python -c "import torch; print(torch.__version__)" && \
|
| 33 |
mlir-opt --version && \
|
| 34 |
llvm-as --version
|
| 35 |
|