forked from SarderLab/Multi-Compartment-Segmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
139 lines (114 loc) · 4.45 KB
/
Copy pathDockerfile
File metadata and controls
139 lines (114 loc) · 4.45 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# This Dockerfile is used to generate the docker image dsarchive/histomicstk
# This docker image includes the HistomicsTK python package along with its
# dependencies.
#
# All plugins of HistomicsTK should derive from this docker image
# start from nvidia/cuda 10.0
# FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
FROM nvidia/cuda:11.1.1-base-ubuntu18.04
LABEL com.nvidia.volumes.needed="nvidia_driver"
LABEL maintainer="Sayat Mimar - Sarder Lab. <sayat.mimar@ufl.edu>"
CMD echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! STARTING THE BUILD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# RUN mkdir /usr/local/nvidia && ln -s /usr/local/cuda-10.0/compat /usr/local/nvidia/lib
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
# Remove bad repos
RUN rm \
/etc/apt/sources.list.d/cuda.list
RUN apt-get update && \
apt-get install --yes --no-install-recommends software-properties-common && \
# As of 2018-04-16 this repo has the latest release of Python 2.7 (2.7.14) \
# add-apt-repository ppa:jonathonf/python-2.7 && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
#keyboard-configuration \
git \
wget \
python-qt4 \
python3-pyqt4 \
curl \
ca-certificates \
libcurl4-openssl-dev \
libexpat1-dev \
unzip \
libhdf5-dev \
libpython-dev \
libpython3-dev \
python2.7-dev \
python-tk \
# We can't go higher than 3.7 and use tensorflow 1.x \
python3.8-dev \
python3.8-distutils \
python3-tk \
software-properties-common \
libssl-dev \
# Standard build tools \
build-essential \
cmake \
autoconf \
automake \
libtool \
pkg-config \
# needed for supporting CUDA \
# libcupti-dev \
# useful later \
libmemcached-dev && \
#apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CHECKPOINT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RUN apt-get update ##[edited]
RUN apt-get install 'ffmpeg'\
'libsm6'\
'libxext6' -y
RUN apt-get install libxml2-dev libxslt1-dev -y
# RUN apt-get install software-properties-common -y
# RUN add-apt-repository ppa:graphics-drivers/ppa -y
# RUN apt-get update -y
# RUN apt-get upgrade -y
# RUN apt-get install nvidia-driver-455 -y
WORKDIR /
# Make Python3 the default and install pip. Whichever is done last determines
# the default python version for pip.
#Make a specific version of python the default and install pip
RUN rm -f /usr/bin/python && \
rm -f /usr/bin/python3 && \
ln `which python3.8` /usr/bin/python && \
ln `which python3.8` /usr/bin/python3 && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
rm get-pip.py && \
ln `which pip3` /usr/bin/pip
RUN which python && \
python --version
# RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
# RUN curl -O https://bootstrap.pypa.io/pip/3.7/get-pip.py && \
# python get-pip.py && \
# rm get-pip.py
ENV build_path=$PWD/build
# HistomicsTK sepcific
# copy HistomicsTK files
ENV mc_path=$PWD/MultiC
RUN mkdir -p $mc_path
RUN apt-get update && \
apt-get install -y --no-install-recommends memcached && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . $mc_path/
WORKDIR $mc_path
RUN pip install --no-cache-dir --upgrade --ignore-installed pip setuptools && \
pip install --no-cache-dir . && \
pip install --no-cache-dir tensorboard cmake onnx && \
pip install --no-cache-dir torch==1.10 torchaudio==0.10 torchvision==0.11.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html && \
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.10/index.html && \
rm -rf /root/.cache/pip/*
RUN python --version && pip --version && pip freeze
WORKDIR $mc_path/multic/cli
# Test our entrypoint. If we have incompatible versions of numpy and
# openslide, one of these will fail
RUN python -m slicer_cli_web.cli_list_entrypoint --list_cli
RUN python -m slicer_cli_web.cli_list_entrypoint MultiCompartmentSegment --help
RUN python -m slicer_cli_web.cli_list_entrypoint FeatureExtraction --help
ENTRYPOINT ["/bin/bash", "docker-entrypoint.sh"]