-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcuda-mkl-pytorch-dev.Dockerfile
27 lines (21 loc) · 1.05 KB
/
cuda-mkl-pytorch-dev.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM nvcr.io/nvidia/pytorch:23.05-py3
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-23-05.html#rel-23-05
# CUDA 12.1.1
# PyTorch 2.0.0
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ python3 python3-dev python3-pip python3-venv cmake make ninja-build \
autoconf automake libtool openjdk-11-jdk libgmp-dev \
libmkl-dev
RUN pip3 install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip # We need `-C` from pip
WORKDIR /opt/freetensor
COPY . .
# We use --no-build-isolation to disable building in a virtual environment because we need
# PyTorch from the system. But this requires us to install build dependencies on our own
RUN python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple "py-build-cmake~=0.1.8"
RUN PY_BUILD_CMAKE_VERBOSE=1 python3 -m pip install --no-build-isolation \
-i https://pypi.tuna.tsinghua.edu.cn/simple -v -e . \
-C--local=with-cuda.toml \
-C--local=with-mkl.toml \
-C--local=with-pytorch.toml
WORKDIR /workspace