-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdockerfile
More file actions
38 lines (24 loc) · 1.06 KB
/
dockerfile
File metadata and controls
38 lines (24 loc) · 1.06 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
FROM python:3.8
RUN apt-get update && apt-get install --fix-missing -y \
python-tk \
nano \
python3-pip\
build-essential \
git \
libopenblas-dev \
liblapack-dev \
libopencv-dev \
graphviz \
libssl-dev
RUN wget https://github.com/Kitware/CMake/releases/download/v3.16.5/cmake-3.16.5.tar.gz && tar -zxvf cmake-3.16.5.tar.gz && cd cmake-3.16.5 && ./bootstrap && make && make install
RUN git clone --recursive https://github.com/apache/incubator-mxnet.git -b v1.7.x
RUN cd incubator-mxnet && mkdir build && cd build && cmake -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=ON -DUSE_MKLDNN=ON -DUSE_OPENMP=ON -DUSE_OPENCV=ON .. && make -j $(nproc) && cd ../python && python setup.py install
# copy package requirements
COPY docker/CPU/requirements.txt .
# install packages
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
COPY /gluoncv /usr/local/lib/python3.8/site-packages/gluoncv/
WORKDIR /main
COPY src/main /main
CMD ["uvicorn", "start:app", "--host", "0.0.0.0", "--port", "4343"]