forked from UCSD-ECEMAE-148/donkeycontainer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.utils
43 lines (39 loc) · 2.38 KB
/
Dockerfile.utils
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM ghcr.io/triton-ai/donkeycontainer:cv2 AS cv2
############## INSTALL BASIC UTILITIES #############
RUN apt-get -y update && apt-get install -y --no-install-recommends \
python3-venv \
python3-dev \
git \
curl && \
rm -rf /var/lib/apt/lists/* && apt-get clean
######### Tensorflow for Jetpack #########
ARG TENSORFLOW_INSTALL=https://developer.download.nvidia.com/compute/redist/jp/v51
RUN apt update && apt install -y \
python3-pip libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev \
zip libjpeg8-dev liblapack-dev libblas-dev gfortran && \
apt clean && rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip && \
pip3 install --no-cache -U testresources setuptools==65.5.0 && \
pip3 install --no-cache -U numpy==1.22 future==0.18.2 mock==3.0.5 keras_preprocessing==1.1.2 keras_applications==1.0.8 gast==0.4.0 protobuf pybind11 cython pkgconfig packaging h5py==3.6.0 && \
pip3 install -U --no-cache --extra-index-url ${TENSORFLOW_INSTALL} tensorflow==2.11.0+nv23.01
######### PyTorch for Jetpack #########
ARG TORCH_INSTALL=https://developer.download.nvidia.com/compute/redist/jp/v50/pytorch/torch-1.12.0a0+2c916ef.nv22.3-cp38-cp38-linux_aarch64.whl
RUN apt-get -y update && \
apt-get -y install autoconf bc build-essential g++-8 gcc-8 clang-8 lld-8 \
gettext-base gfortran-8 iputils-ping libbz2-dev libc++-dev libcgal-dev \
libffi-dev libfreetype6-dev libhdf5-dev libjpeg-dev liblzma-dev libncurses5-dev \
libncursesw5-dev libpng-dev libreadline-dev libssl-dev libsqlite3-dev libxml2-dev \
libxslt-dev locales moreutils openssl python-openssl rsync scons python3-pip \
libopenblas-dev && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip && python3 -m pip install aiohttp numpy \
scipy=='1.5.3'&& export "LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH" &&\
python3 -m pip install --upgrade protobuf=='3.20.3' && python3 -m pip install --no-cache $TORCH_INSTALL
######### TorchVision for Jetpack #########
ARG TORCHVISION_INSTALL=release/0.13
RUN apt-get -y update && \
apt-get install -y libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev && \
git clone --branch $TORCHVISION_INSTALL https://github.com/pytorch/vision torchvision # see below for version of torchvision to download
RUN cd torchvision && \
python3 setup.py install --user