forked from TheFoundryVisionmongers/nuke-ML-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
py2.Dockerfile
61 lines (53 loc) · 1.85 KB
/
py2.Dockerfile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Ubuntu 18.04 with CUDA 10.0, CuDNN 7.6
# Python2.7, TensorFlow 1.15.0, PyTorch 1.4
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
curl \
git \
libglib2.0-0 \
libjpeg-dev \
libopencv-dev \
libopenexr-dev \
libpng-dev \
libsm-dev \
vim && \
rm -rf /var/lib/apt/lists/*
# Install Python 2.7
RUN apt-get update && apt-get install -y --no-install-recommends \
python-pip \
python2.7-dev && \
rm -rf /var/lib/apt/lists/*
# pip version 21.0 will drop support for Python 2.7
RUN python -m pip install --upgrade pip==20.1
RUN pip install --no-cache-dir setuptools wheel && \
pip install --no-cache-dir \
future \
gast==0.2.2 \
protobuf \
pyyaml==3.13 \
scikit-image \
typing \
imageio==2.6.1 \
OpenEXR==1.3.2
# Install TF 1.15.0 GPU for Python2.7
RUN pip install --no-cache-dir \
tensorflow-gpu==1.15.0 \
tensorflow-determinism
# Install PyTorch (include Caffe2) for CUDA 10.0
RUN pip install --no-cache-dir torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install --no-cache-dir cupy-cuda100
RUN pip install --no-cache-dir cython
WORKDIR /workspace
# Install the COCO API
RUN pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
# Install detectron for mask RCNN
RUN git clone https://github.com/facebookresearch/detectron
RUN sed -i 's/cythonize(ext_modules)/cythonize(ext_modules, language_level="2")/g' detectron/setup.py
RUN cd detectron && pip install -r requirements.txt && make
WORKDIR /workspace/ml-server
# Copy your current folder to the docker image /workspace/ml-server/ folder
COPY . .