forked from maxisoft/pytorch-arm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.stage1
25 lines (23 loc) · 1.63 KB
/
Dockerfile.stage1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG pythonlabel=3.10-bullseye
FROM python:${pythonlabel}
ARG TARGETPLATFORM
ARG TORCHTAG=v1.13.0
ARG NUMPY_VERSION===1.23
ARG GITHUB_USER=sn0wst0rm
ARG REPO_NAME=pytorch-arm
LABEL maintainer="github.com/${GITHUB_USER}" name="torch-arm" description="torch building container" org.opencontainers.image.description="torch building container" nimversion="$NIM_VERSION" url="https://github.com/${GITHUB_USER}/${REPO_NAME}" vcs-url="https://github.com/${GITHUB_USER}/${REPO_NAME}" org.opencontainers.image.source="https://github.com/${GITHUB_USER}/${REPO_NAME}"
ENV DEBIAN_FRONTEND=noninteractive TORCHTAG=${TORCHTAG} NUMPY_VERSION=${NUMPY_VERSION} GITHUB_USER=${GITHUB_USER} NO_CUDA=1 USE_MKLDNN=0 USE_NCCL=0 BUILD_TEST=0 USE_ZSTD=1 USE_NUMPY=1 USE_SYSTEM_NCCL=0 USE_ZMQ=0 USE_REDIS=0 USE_TBB=1 USE_FFTW=0 USE_GFLAGS=0 USE_GLOG=0 USE_LMDB=0 USE_NUMA=0 USE_MPI=0 BUILD_ONNX_PYTHON=1 TORCHVISION=v0.14.0
WORKDIR /src/torch
RUN apt-get update && apt-get install -y \
automake autoconf libpng-dev nano \
curl zip unzip libtool swig zlib1g-dev pkg-config git wget xz-utils \
libopenblas-dev libblas-dev m4 cmake g++ gcc libssl-dev libczmq-dev redis libhiredis-dev libtbb-dev build-essential libgflags-dev libgoogle-glog-dev liblmdb-dev libnuma-dev && \
mkdir -p wheels && \
python --version && \
python -m pip wheel -w wheels pyyaml "numpy${NUMPY_VERSION}" && \
python -m pip install wheels/* && \
git clone --depth 100 -b ${TORCHTAG} -- https://github.com/pytorch/pytorch.git && \
cd pytorch && \
git submodule update --init --recursive --depth 100 && \
python -m pip install -U future mock wheel cython && \
python -m pip install -r requirements.txt