Compare commits

...

4 Commits

Author SHA1 Message Date
96ca226a73 feat(dockerfile): shrink layers & build cleaner (#95375)
this change will reduce the layer size as it will not save the layers also it will build cleaner on other machines as it won't ask for a user interaction when running the build

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95375
Approved by: https://github.com/ezyang

(cherry picked from commit 1c526664d5b9556fa7c24d492cec05e622c58c2e)
2023-05-12 16:21:40 -07:00
a78b5f6680 Update PyTorch docker base image to Ubuntu-20.04 (take 2) (#101310)
Followup after https://github.com/pytorch/pytorch/pull/101301

<!--
copilot:poem
-->

> _`BASE_RUNTIME` changed_
> _Ubuntu twenty oh four_
> _Spring of new features_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101310
Approved by: https://github.com/atalman

(cherry picked from commit 47c99e3a1c137e53e58299279dd7bbd1d9d33cdf)
2023-05-12 14:51:45 -07:00
51b42d98d6 [CI] s#@master#@release/2.0#
As release build should not depend on trunk changes
2023-05-12 14:11:09 -07:00
0bd6be966b Use 20.04 as base image (#101301)
As 18.04 just EOLed 2 weeks ago.

Fixes https://github.com/pytorch/pytorch/issues/81120

Pull Request resolved: https://github.com/pytorch/pytorch/pull/101301
Approved by: https://github.com/seemethere, https://github.com/atalman

(cherry picked from commit c772d56966574deee7b94d060ec77880f581b762)
2023-05-12 14:01:38 -07:00
26 changed files with 39 additions and 38 deletions

View File

@ -35,7 +35,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -35,7 +35,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -35,7 +35,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -131,7 +131,7 @@ jobs:
with:
github-secret: ${{ secrets.github-token }}
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux
- name: Chown workspace

View File

@ -128,7 +128,7 @@ jobs:
github-secret: ${{ secrets.github-token }}
# Setup the environment
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux
- name: Chown workspace

View File

@ -96,7 +96,7 @@ jobs:
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
no-sudo: true

View File

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Set up JDK 8
uses: actions/setup-java@v3

View File

@ -22,7 +22,7 @@ jobs:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false
fetch-depth: 1

View File

@ -76,7 +76,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -38,7 +38,7 @@ jobs:
steps:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Populate CI build options
run: |

View File

@ -76,7 +76,7 @@ jobs:
# checkout because when we run this action we don't *have* a local
# checkout. In other cases you should prefer a local checkout.
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -48,7 +48,7 @@ jobs:
keep-going: ${{ steps.filter.outputs.keep-going }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
fetch-depth: 1
submodules: false
@ -79,7 +79,7 @@ jobs:
docker exec -it $(docker container ps --format '{{.ID}}') bash
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -79,7 +79,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Set xcode version
env:

View File

@ -47,7 +47,7 @@ jobs:
is-test-matrix-empty: ${{ steps.filter.outputs.is-test-matrix-empty }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
fetch-depth: 1
submodules: false
@ -96,7 +96,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Download build artifacts
uses: ./.github/actions/download-build-artifacts

View File

@ -54,7 +54,7 @@ jobs:
is-test-matrix-empty: ${{ steps.filter.outputs.is-test-matrix-empty }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
fetch-depth: 1
submodules: false
@ -78,7 +78,7 @@ jobs:
steps:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
no-sudo: true

View File

@ -13,7 +13,7 @@ jobs:
steps:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup miniconda
uses: pytorch/test-infra/.github/actions/setup-miniconda@main

View File

@ -68,7 +68,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
no-sudo: true

View File

@ -36,7 +36,7 @@ jobs:
is-test-matrix-empty: ${{ steps.filter.outputs.is-test-matrix-empty }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
fetch-depth: 1
submodules: false
@ -119,7 +119,7 @@ jobs:
# [see note: pytorch repo ref]
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
no-sudo: true

View File

@ -38,7 +38,7 @@ jobs:
github-secret: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false
@ -160,7 +160,7 @@ jobs:
github-secret: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false

View File

@ -15,7 +15,7 @@ jobs:
runs-on: linux.20_04.4x
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false
fetch-depth: 1

View File

@ -62,7 +62,7 @@ jobs:
# [see note: pytorch repo ref]
# deep clone (fetch-depth 0) required for git merge-base
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- name: Setup Linux
uses: ./.github/actions/setup-linux

View File

@ -106,7 +106,7 @@ jobs:
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-pr-sanity-checks')
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false
fetch-depth: -1
@ -216,7 +216,7 @@ jobs:
# [see note: pytorch repo ref]
# deep clone (fetch-depth 0) required, to allow us to use git log
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
submodules: false
fetch-depth: 1

View File

@ -14,7 +14,7 @@ jobs:
if: ${{ github.repository == 'pytorch/pytorch' }}
steps:
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
with:
fetch-depth: 1
submodules: false

View File

@ -37,7 +37,7 @@ jobs:
run: echo "${TRIGGERING_WORKFLOW}"
- name: Checkout PyTorch
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.0
- run: |
pip3 install requests==2.26

View File

@ -7,11 +7,11 @@
#
# For reference:
# https://docs.docker.com/develop/develop-images/build_enhancements/
ARG BASE_IMAGE=ubuntu:18.04
ARG BASE_IMAGE=ubuntu:20.04
ARG PYTHON_VERSION=3.8
FROM ${BASE_IMAGE} as dev-base
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
ccache \
@ -82,15 +82,16 @@ ARG TRITON_VERSION
ARG TARGETPLATFORM
ARG CUDA_VERSION
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
libjpeg-dev \
libpng-dev
libpng-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=conda-installs /opt/conda /opt/conda
RUN if test -n "${TRITON_VERSION}" -a "${TARGETPLATFORM}" != "linux/arm64"; then \
apt install -y --no-install-recommends gcc; \
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends gcc; \
rm -rf /var/lib/apt/lists/*; \
fi
RUN rm -rf /var/lib/apt/lists/*
ENV PATH /opt/conda/bin:$PATH
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility

View File

@ -10,8 +10,8 @@ endif
CUDA_VERSION = 11.7.0
CUDNN_VERSION = 8
BASE_RUNTIME = ubuntu:18.04
BASE_DEVEL = nvidia/cuda:$(CUDA_VERSION)-cudnn$(CUDNN_VERSION)-devel-ubuntu18.04
BASE_RUNTIME = ubuntu:20.04
BASE_DEVEL = nvidia/cuda:$(CUDA_VERSION)-cudnn$(CUDNN_VERSION)-devel-ubuntu20.04
# The conda channel to use to install cudatoolkit
CUDA_CHANNEL = nvidia