mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
feat: Update Dockerfile default versions for Python, OS, and CUDA arch list (#121560)
- Update Dockerfile default versions for Python, OS, and CUDA arch list - Python 3.8 is EOL later this year, the `docker.Makefile` has 3.10 as default - `docker.Makefile` is using 22.04 so this just aligns that - The GPU feature list is quite dated, most of those architectures are long past EOL and we aren't getting the newer cards (A100, H100) into that list until now https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list Pull Request resolved: https://github.com/pytorch/pytorch/pull/121560 Approved by: https://github.com/seemethere, https://github.com/Neilblaze, https://github.com/atalman, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
d62bdb087d
commit
844bfbbd2e
10
Dockerfile
10
Dockerfile
@ -7,8 +7,8 @@
|
||||
#
|
||||
# For reference:
|
||||
# https://docs.docker.com/develop/develop-images/build_enhancements/
|
||||
ARG BASE_IMAGE=ubuntu:20.04
|
||||
ARG PYTHON_VERSION=3.8
|
||||
ARG BASE_IMAGE=ubuntu:22.04
|
||||
ARG PYTHON_VERSION=3.11
|
||||
|
||||
FROM ${BASE_IMAGE} as dev-base
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
@ -26,7 +26,7 @@ RUN mkdir /opt/ccache && ccache --set-config=cache_dir=/opt/ccache
|
||||
ENV PATH /opt/conda/bin:$PATH
|
||||
|
||||
FROM dev-base as conda
|
||||
ARG PYTHON_VERSION=3.8
|
||||
ARG PYTHON_VERSION=3.11
|
||||
# Automatically set by buildx
|
||||
ARG TARGETPLATFORM
|
||||
# translating Docker's TARGETPLATFORM into miniconda arches
|
||||
@ -57,12 +57,12 @@ COPY --from=submodule-update /opt/pytorch /opt/pytorch
|
||||
RUN make triton
|
||||
RUN --mount=type=cache,target=/opt/ccache \
|
||||
export eval ${CMAKE_VARS} && \
|
||||
TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX 8.0" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
|
||||
TORCH_CUDA_ARCH_LIST="7.0 7.2 7.5 8.0 8.6 8.7 8.9 9.0 9.0a" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
|
||||
CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
|
||||
python setup.py install
|
||||
|
||||
FROM conda as conda-installs
|
||||
ARG PYTHON_VERSION=3.8
|
||||
ARG PYTHON_VERSION=3.11
|
||||
ARG CUDA_VERSION=12.1
|
||||
ARG CUDA_CHANNEL=nvidia
|
||||
ARG INSTALL_CHANNEL=pytorch-nightly
|
||||
|
Reference in New Issue
Block a user