2
2
FROM nvidia/cuda:9.0-devel-ubuntu16.04
3
3
MAINTAINER avanetten
4
4
5
- # nvidia-docker build -t simrdwn2.1 . # build (use existing packages)
6
- # nvidia-docker build --no-cache -t simrdwn2.2 . # rebuild from scratch
7
- # NV_GPU=0 nvidia-docker run -it -v /local_data:/local_data --name simrdwn2.2_gpu0 simrdwn2.2
8
- # NV_GPU=0 nvidia-docker run -it -v /local_data:/local_data -v /cosmiq:/cosmiq --name simrdwn2.1_gpu0 simrdwn2.1
9
-
10
5
# IF YOU WANT PROGRESS PRINTED TO TERMINAL
11
6
# Update model_main to log to screen...
12
7
# https://stackoverflow.com/questions/52016255/tensorflow-object-detection-api-not-displaying-global-steps
@@ -73,78 +68,84 @@ SHELL ["/bin/bash", "-c"]
73
68
ENV PATH /opt/conda/bin:$PATH
74
69
75
70
# install anaconda
76
- RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O ~/miniconda.sh && \
71
+ # https://repo.continuum.io/miniconda/
72
+ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh -O ~/miniconda.sh && \
77
73
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
78
74
rm ~/miniconda.sh && \
79
75
/opt/conda/bin/conda clean -tipsy && \
80
76
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
81
77
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
82
78
echo "conda activate base" >> ~/.bashrc
83
- ENV TINI_VERSION v0.16.1
79
+ # ENV TINI_VERSION v0.16.1
80
+ ENV TINI_VERSION v0.18.0
84
81
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
85
82
RUN chmod +x /usr/bin/tini
86
83
87
84
# use conda-forge instead of default channel
88
- RUN conda update conda && \
89
- conda config --remove channels defaults && \
90
- conda config --add channels conda-forge
85
+ RUN conda config --add channels conda-forge
86
+ # && \
87
+ # conda update conda
88
+ # conda config --remove channels defaults && \
91
89
92
90
# set up conda environment and add to $PATH
93
- RUN conda create -n simrdwn2 python=3.6 \
94
- && echo "source activate simrdwn2 " > ~/.bashrc
95
- ENV PATH /opt/conda/envs/simrdwn2 /bin:$PATH
91
+ RUN conda create -n simrdwn python=3.6 \
92
+ && echo "source activate simrdwn " > ~/.bashrc
93
+ ENV PATH /opt/conda/envs/simrdwn /bin:$PATH
96
94
97
95
# install GPU version of tensorflow
98
- RUN source activate simrdwn2 && \
99
- conda install -n simrdwn2 -c defaults tensorflow-gpu=1.13.1
96
+ RUN source activate simrdwn && \
97
+ conda install -n simrdwn -c defaults tensorflow-gpu=1.13.1
100
98
101
99
# install keras with tf backend
102
100
ENV KERAS_BACKEND=tensorflow
103
- RUN source activate simrdwn2 \
104
- && conda install -n simrdwn2 keras
105
-
106
- RUN conda install -n simrdwn2 \
107
- # awscli \
108
- affine \
109
- pyproj \
101
+ RUN source activate simrdwn \
102
+ && conda install -n simrdwn keras=2.2.4
103
+
104
+ RUN source activate simrdwn \
105
+ && conda install -n simrdwn \
106
+ libgdal=2.4.1 \
107
+ gdal=2.4.1 \
108
+ geopandas=0.5.0 \
109
+ opencv=4.1.0 \
110
+ affine=2.2.2 \
111
+ pyproj=2.1.3 \
110
112
pyhamcrest=1.9.0 \
111
- cython \
112
- contextlib2 \
113
- fiona \
114
- h5py \
115
- ncurses \
116
- jupyter \
117
- jupyterlab \
118
- ipykernel \
119
- libgdal \
120
- matplotlib \
121
- ncurses \
122
- numpy \
123
- # opencv=3.4.1 \
124
- # py-opencv \
125
- pandas \
126
- pillow \
127
- pip \
128
- scipy \
129
- scikit-image \
130
- scikit-learn \
131
- shapely \
132
- gdal \
133
- rtree \
134
- testpath \
135
- tqdm \
136
- pandas \
137
- geopandas \
138
- rasterio \
139
- opencv=4.0.0 \
113
+ cython=0.29.10 \
114
+ contextlib2=0.5.5 \
115
+ h5py=2.9.0 \
116
+ ncurses=6.1 \
117
+ jupyter=1.0.0 \
118
+ jupyterlab=0.35.6 \
119
+ ipykernel=5.1.1 \
120
+ matplotlib=3.1.0 \
121
+ numpy=1.16.4 \
122
+ pandas=0.24.2 \
123
+ pillow=6.0.0 \
124
+ pip=19.1.1 \
125
+ scipy=1.3.0 \
126
+ scikit-image=0.15.0 \
127
+ scikit-learn=0.21.2 \
128
+ shapely=1.6.4 \
129
+ rtree=0.8.3 \
130
+ testpath=0.4.2 \
131
+ tqdm=4.32.1 \
132
+ statsmodels=0.10.1 \
140
133
&& conda clean -p \
141
134
&& conda clean -t \
142
135
&& conda clean --yes --all
143
136
144
- RUN pip install statsmodels
137
+ # Below is a hack to get around conda issues (2019-07-19)
138
+ RUN source activate simrdwn \
139
+ && conda install -n simrdwn \
140
+ -c conda-forge rasterio=1.0.24 \
141
+ && conda clean -p \
142
+ && conda clean -t \
143
+ && conda clean --yes --all
145
144
146
145
# tf object detection api
147
146
RUN git clone https://github.com/tensorflow/models.git /tensorflow/models
147
+ WORKDIR /tensorflow/models/research/
148
+ RUN git checkout r1.13.0
148
149
# WORKDIR /tensorflow/models/research/
149
150
# RUN protoc object_detection/protos/*.proto --python_out=.
150
151
# WORKDIR /tensorflow/models/research/
@@ -167,8 +168,28 @@ RUN export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
167
168
ENV PYTHONPATH $PYTHONPATH:/tensorflow/models/:/tensorflow/models/slim
168
169
ENV PYTHONPATH $PYTHONPATH:/tensorflow/models/:/tensorflow/models/research/slim
169
170
171
+ # # this always seems to fail, so do it manually (as above)
172
+ # RUN git clone https://github.com/cocodataset/cocoapi.git /cocoapi
173
+ # WORKDIR /cocoapi/PythonAPI
174
+ # RUN make
175
+ # RUN cp -r pycocotools /tensorflow/models/research/
176
+ # # From tensorflow/models/research/
177
+ # WORKDIR /tensorflow/models/research/
178
+ # RUN protoc object_detection/protos/*.proto --python_out=.
179
+
180
+ # # test
181
+ # WORKDIR /tensorflow/models/research/
182
+ # RUN PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
183
+ # RUN python /tensorflow/models/research/object_detection/builders/model_builder_test.py
184
+ #
185
+ # # RUN source activate simrdwn && \
186
+ # # python /tensorflow/models/research/object_detection/builders/model_builder_test.py
187
+ # # # ENV MODELS_DIR /tensorflow/models/research/
188
+ # # # PYTHONPATH=${MODELS_DIR}/research:$MODELS_DIR/research/slim \
189
+ # # #PYTHON $MODELS_DIR/research/object_detection/builders/model_builder_test.py
190
+
170
191
# # add a jupyter kernel for the conda environment in case it's wanted
171
- RUN source activate simrdwn2 && python -m ipykernel.kernelspec
192
+ RUN source activate simrdwn && python -m ipykernel.kernelspec
172
193
RUN python -m ipykernel.kernelspec
173
194
174
195
0 commit comments