@@ -17,11 +17,9 @@ FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
1717
1818# Install (as root)
1919# Base
20- RUN apt-get update --fix-missing && apt-get -y --no-install-recommends install build-essential netbase unzip file libmagic1
21-
22- # CUDA 10.1 dependencies and tools to build dlib
23- RUN apt-get -y --no-install-recommends install libsm6 libxrender1 libxrender-dev libxext6 libglib2.0-0 git cmake
24- RUN apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 libnvinfer-dev=6.0.1-1+cuda10.1 libnvinfer-plugin6=6.0.1-1+cuda10.1
20+ RUN apt-get update --fix-missing
21+ RUN apt-get -y --no-install-recommends install build-essential
22+ RUN apt-get -y --no-install-recommends install netbase unzip file libmagic1
2523
2624# Python
2725RUN apt-get -y --no-install-recommends install python3 python3-dev
@@ -41,6 +39,21 @@ RUN /usr/bin/python3 -m pip install fastcache
4139# Needed for multi-language support (currently just Java)
4240RUN /usr/bin/python3 -m pip install thriftpy2
4341
42+ # Add components (as mfn)
43+ RUN groupadd -o -g 1000 -r mfn && useradd -d /opt/mfn -u 1000 -m -r -g mfn mfn
44+ RUN mkdir /opt/mfn/logs
45+
46+ RUN /usr/bin/python3 -m pip install redis
47+ ADD build/redis-server.tar.gz /opt/mfn/
48+ ADD frontend/frontend /opt/mfn/frontend
49+ ADD build/SandboxAgent.tar.gz /opt/mfn/
50+ ADD build/FunctionWorker.tar.gz /opt/mfn/
51+ ADD build/LoggingService.tar.gz /opt/mfn/
52+
53+ # CUDA 10.1 dependencies and tools to build dlib
54+ RUN apt-get -y --no-install-recommends install libsm6 libxrender1 libxrender-dev libxext6 libglib2.0-0 git cmake
55+ RUN apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 libnvinfer-dev=6.0.1-1+cuda10.1 libnvinfer-plugin6=6.0.1-1+cuda10.1
56+
4457# Install dlib for CUDA
4558RUN git clone https://github.com/davisking/dlib.git
4659RUN mkdir -p /dlib/build
@@ -51,19 +64,9 @@ RUN cmake --build /dlib/build
5164RUN cd /dlib; python3 /dlib/setup.py install
5265
5366# Install the face recognition package and tensorflow
54- #RUN pip3 install face_recognition
55- #RUN pip3 install tensorflow==2.1.0
56-
57- # Add components (as mfn)
58- RUN groupadd -o -g 1000 -r mfn && useradd -d /opt/mfn -u 1000 -m -r -g mfn mfn
59- RUN mkdir /opt/mfn/logs
67+ #RUN /usr/bin/python3 -m pip install face_recognition
68+ #RUN /usr/bin/python3 -m pip install tensorflow==2.1.0
6069
61- RUN /usr/bin/python3 -m pip install redis
62- ADD build/redis-server.tar.gz /opt/mfn/
63- ADD frontend/frontend /opt/mfn/frontend
64- ADD build/SandboxAgent.tar.gz /opt/mfn/
65- ADD build/FunctionWorker.tar.gz /opt/mfn/
66- ADD build/LoggingService.tar.gz /opt/mfn/
6770
6871RUN chown mfn:mfn -R /opt/mfn
6972USER mfn
0 commit comments