docker: Use miniforge, install from pip (#134274)

Switch installation of the pytorch package to be installed from our download.pytorch.org sources which are better maintained.

As well, switching over the miniconda installation to a miniforge installation in order to ensure backwards compat for users expecting to have the conda package manager installed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/134274
Approved by: https://github.com/malfet, https://github.com/atalman

Co-authored-by: atalman <atalman@fb.com>
This commit is contained in:
Eli Uriegas
2024-08-22 23:20:21 +00:00
committed by PyTorch MergeBot
parent 30d7e7a1cd
commit b2eb0e8c6a
3 changed files with 15 additions and 10 deletions

View File

@ -18,7 +18,12 @@ CMAKE_VARS ?=
# The conda channel to use to install cudatoolkit
CUDA_CHANNEL = nvidia
# The conda channel to use to install pytorch / torchvision
INSTALL_CHANNEL ?= pytorch
INSTALL_CHANNEL ?= whl
CUDA_PATH ?= cpu
ifneq ("$(CUDA_VERSION_SHORT)","cpu")
CUDA_PATH = cu$(subst .,,$(CUDA_VERSION_SHORT))
endif
PYTHON_VERSION ?= 3.11
# Match versions that start with v followed by a number, to avoid matching with tags like ciflow
@ -31,7 +36,7 @@ TRITON_VERSION ?=
BUILD_ARGS = --build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg CUDA_VERSION=$(CUDA_VERSION) \
--build-arg CUDA_CHANNEL=$(CUDA_CHANNEL) \
--build-arg CUDA_PATH=$(CUDA_PATH) \
--build-arg PYTORCH_VERSION=$(PYTORCH_VERSION) \
--build-arg INSTALL_CHANNEL=$(INSTALL_CHANNEL) \
--build-arg TRITON_VERSION=$(TRITON_VERSION) \