mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Migration of Docker conda builds to pytorch/pytorch from pytorch/builder: https://github.com/pytorch/builder/blob/main/.github/workflows/build-conda-images.yml Related to: https://github.com/pytorch/builder/issues/1849 Migrate scripts and worklfows, adds logic to execute on PR and upload to ecr with github hash tag in order to test Docker build and nightly on PR. Test when executing on PR, upload to ecr: https://github.com/pytorch/pytorch/actions/runs/9799439218/job/27059691327 ``` 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/conda-builder-cpu:789cf8fcd738088860056160f6e9ea7cd005972b ``` Test With-Push, upload to dockerhub: https://github.com/pytorch/pytorch/actions/runs/9799783407/job/27060633427 ``` docker.io/pytorch/conda-builder:cpu done ``` Will upload here: https://hub.docker.com/r/pytorch/conda-builder/ Test using ecr image in the nightly workflow: https://github.com/pytorch/pytorch/actions/runs/9798428933/job/27057835235#step:16:87 Note: This is first part that will build docker and upload it to either dockerhub or ecr. After merging followup PR will need to change conda nightly workflows to either use ecr image or dockerhub image, depending if we are running it on PR or from main/release branch. Cleanup of workflows and scripts from builder repo: https://github.com/pytorch/builder/pull/1923 Co-authored-by: atalman <atalman@fb.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/129022 Approved by: https://github.com/atalman, https://github.com/seemethere, https://github.com/malfet, https://github.com/chuanqi129
21 lines
987 B
Bash
Executable File
21 lines
987 B
Bash
Executable File
#!/bin/bash
|
|
# Script used only in CD pipeline
|
|
set -ex
|
|
|
|
# Anaconda
|
|
# Latest anaconda is using openssl-3 which is incompatible with all currently published versions of git
|
|
# Which are using openssl-1.1.1, see https://anaconda.org/anaconda/git/files?version=2.40.1 for example
|
|
MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh
|
|
wget -q $MINICONDA_URL
|
|
# NB: Manually invoke bash per https://github.com/conda/conda/issues/10431
|
|
bash $(basename "$MINICONDA_URL") -b -p /opt/conda
|
|
rm $(basename "$MINICONDA_URL")
|
|
export PATH=/opt/conda/bin:$PATH
|
|
# See https://github.com/pytorch/builder/issues/1473
|
|
# Pin conda to 23.5.2 as it's the last one compatible with openssl-1.1.1
|
|
conda install -y conda=23.5.2 conda-build anaconda-client git ninja
|
|
# The cmake version here needs to match with the minimum version of cmake
|
|
# supported by PyTorch (3.18). There is only 3.18.2 on anaconda
|
|
/opt/conda/bin/pip3 install cmake==3.18.2
|
|
conda remove -y --force patchelf
|