• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:docker +full:- +full:cpu +full:- +full:aarch64

1 # syntax=docker/dockerfile:1
3 # NOTE: Building this image require's docker version >= 23.0.
6 # - https://docs.docker.com/build/dockerfile/frontend/#stable-channel
11 FROM ${BASE_IMAGE} as dev-base
12 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
13 build-essential \
14 ca-certificates \
19 libjpeg-dev \
20 libpng-dev && \
21 rm -rf /var/lib/apt/lists/*
22 RUN /usr/sbin/update-ccache-symlinks
23 RUN mkdir /opt/ccache && ccache --set-config=cache_dir=/opt/ccache
26 FROM dev-base as conda
30 # translating Docker's TARGETPLATFORM into miniconda arches
32 "linux/arm64") MINICONDA_ARCH=aarch64 ;; \
35 …curl -fsSL -v -o ~/miniconda.sh -O "https://github.com/conda-forge/miniforge/releases/latest/down…
39 bash ~/miniconda.sh -b -p /opt/conda && \
41 …/opt/conda/bin/conda install -y python=${PYTHON_VERSION} cmake conda-build pyyaml numpy ipython &&…
42 /opt/conda/bin/python -mpip install -r requirements.txt && \
43 /opt/conda/bin/conda clean -ya
45 FROM dev-base as submodule-update
48 RUN git submodule update --init --recursive
50 FROM conda as build
53 COPY --from=conda /opt/conda /opt/conda
54 COPY --from=submodule-update /opt/pytorch /opt/pytorch
56 RUN --mount=type=cache,target=/opt/ccache \
58 …H_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" \
62 FROM conda as conda-installs
68 RUN /opt/conda/bin/conda update -y -n base -c defaults conda
69 RUN /opt/conda/bin/conda install -y python=${PYTHON_VERSION}
73 # INSTALL_CHANNEL whl - release, whl/nightly - nightly, whle/test - test channels
75 …"linux/arm64") pip install --extra-index-url https://download.pytorch.org/whl/cpu/ torch torchvis…
76 …*) pip install --index-url https://download.pytorch.org/${INSTALL_CHANNEL}/${CUDA_PAT…
78 /opt/conda/bin/conda clean -ya
80 RUN IS_CUDA=$(python -c 'import torch ; print(torch.cuda._is_compiled())'); \
82 if test "${IS_CUDA}" != "True" -a ! -z "${CUDA_VERSION}"; then \
92 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
93 ca-certificates \
94 libjpeg-dev \
95 libpng-dev \
96 && rm -rf /var/lib/apt/lists/*
97 COPY --from=conda-installs /opt/conda /opt/conda
98 RUN if test -n "${TRITON_VERSION}" -a "${TARGETPLATFORM}" != "linux/arm64"; then \
99 DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends gcc; \
100 rm -rf /var/lib/apt/lists/*; \
111 # Should override the already installed version from the official-image stage
112 COPY --from=build /opt/conda /opt/conda