Docker GPU Images: Add NVIDIA/apex to the cuda images with pytorch (#7598)
- Use cuda:10.2 image instead of 10.1 (to address version mismatch warning with pytorch) - Use devel version that is built on the runtime and includes headers and development tools (was otherwise failing to build apex)
This commit is contained in:
committed by
GitHub
parent
4d541f516f
commit
98fb718577
@@ -1,4 +1,4 @@
|
|||||||
FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
|
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
|
||||||
LABEL maintainer="Hugging Face"
|
LABEL maintainer="Hugging Face"
|
||||||
LABEL repository="transformers"
|
LABEL repository="transformers"
|
||||||
|
|
||||||
@@ -18,9 +18,14 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip && \
|
|||||||
tensorflow \
|
tensorflow \
|
||||||
torch
|
torch
|
||||||
|
|
||||||
|
RUN git clone https://github.com/NVIDIA/apex
|
||||||
|
RUN cd apex && \
|
||||||
|
python3 setup.py install && \
|
||||||
|
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
COPY . transformers/
|
COPY . transformers/
|
||||||
RUN cd transformers/ && \
|
RUN cd transformers/ && \
|
||||||
python3 -m pip install --no-cache-dir .
|
python3 -m pip install --no-cache-dir .
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
|
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
|
||||||
LABEL maintainer="Hugging Face"
|
LABEL maintainer="Hugging Face"
|
||||||
LABEL repository="transformers"
|
LABEL repository="transformers"
|
||||||
|
|
||||||
@@ -17,9 +17,14 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip && \
|
|||||||
mkl \
|
mkl \
|
||||||
torch
|
torch
|
||||||
|
|
||||||
|
RUN git clone https://github.com/NVIDIA/apex
|
||||||
|
RUN cd apex && \
|
||||||
|
python3 setup.py install && \
|
||||||
|
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
COPY . transformers/
|
COPY . transformers/
|
||||||
RUN cd transformers/ && \
|
RUN cd transformers/ && \
|
||||||
python3 -m pip install --no-cache-dir .
|
python3 -m pip install --no-cache-dir .
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
|||||||
Reference in New Issue
Block a user