|
| 1 | +FROM ubuntu:18.04 |
| 2 | +#author information |
| 3 | +MAINTAINER Jayson Boubin |
| 4 | +LABEL version="1.0" |
| 5 | +LABEL description="SoftwarePilot Demo Container" |
| 6 | + |
| 7 | +#Update Sources |
| 8 | +RUN apt-get update |
| 9 | + |
| 10 | +#Install basic applications |
| 11 | +RUN apt-get install -y git && \ |
| 12 | + apt-get install -y vim && \ |
| 13 | + apt-get install -y cmake && \ |
| 14 | + apt-get install -y curl && \ |
| 15 | + apt-get install -y unzip && \ |
| 16 | + apt-get install -y nano && \ |
| 17 | + apt-get install -y wget |
| 18 | +#Install python3 |
| 19 | +RUN apt-get install -y python3.6 && \ |
| 20 | + apt-get install -y python3-pip |
| 21 | + |
| 22 | +#install DLIB and face_recognition |
| 23 | +RUN pip3 install face_recognition |
| 24 | + |
| 25 | +#install OpenCV |
| 26 | + |
| 27 | +run pip3 install scikit-learn |
| 28 | + |
| 29 | +run pip3 install scikit-build |
| 30 | + |
| 31 | +RUN pip3 install opencv-python |
| 32 | +RUN apt-get install -y libfontconfig1 libxrender1 && \ |
| 33 | + apt-get install -y libsm6 libxext6 |
| 34 | + |
| 35 | +#install pydarknet for CPU |
| 36 | +RUN apt-get install -y pkg-config && \ |
| 37 | + pip3 install yolo34py |
| 38 | + |
| 39 | +#install java8 |
| 40 | +#RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:webupd8team/java && apt-get update && apt-get install -y oracle-java8-installer && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/oracle-jdk8-installer |
| 41 | + |
| 42 | +RUN apt-get update && \ |
| 43 | + apt-get install -y openjdk-8-jdk && \ |
| 44 | + apt-get install -y ant && \ |
| 45 | + apt-get clean; |
| 46 | + |
| 47 | +RUN apt-get update && \ |
| 48 | + apt-get install -y ca-certificates-java && \ |
| 49 | + apt-get clean && \ |
| 50 | + update-ca-certificates -f |
| 51 | + |
| 52 | + |
| 53 | +#Set Android Environment Variables |
| 54 | +ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip" \ |
| 55 | + ANDROID_HOME="/usr/local/android-sdk" \ |
| 56 | + ANDROID_VERSION=26 \ |
| 57 | + ANDROID_BUILD_TOOLS_VERSION=26.0.2 |
| 58 | + |
| 59 | +#Install Gradle |
| 60 | +RUN cd /usr/local && \ |
| 61 | + curl -L https://services.gradle.org/distributions/gradle-4.4-all.zip -o gradle-4.4-all.zip && \ |
| 62 | + unzip gradle-4.4-all.zip && \ |
| 63 | + rm gradle-4.4-all.zip |
| 64 | + |
| 65 | +#Download Android SDK |
| 66 | +RUN mkdir "$ANDROID_HOME" .android && \ |
| 67 | + cd "$ANDROID_HOME" && \ |
| 68 | + curl -o sdk.zip $SDK_URL && \ |
| 69 | + unzip sdk.zip && \ |
| 70 | + rm sdk.zip && \ |
| 71 | + yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses |
| 72 | + |
| 73 | +#Install Android Build Tool and Libraries |
| 74 | +RUN $ANDROID_HOME/tools/bin/sdkmanager --update && \ |
| 75 | + $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \ |
| 76 | + "platforms;android-${ANDROID_VERSION}" \ |
| 77 | + "platform-tools" && \ |
| 78 | + $ANDROID_HOME/tools/bin/sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" |
| 79 | + |
| 80 | +#Install Codebase |
| 81 | +RUN cd /home && \ |
| 82 | + git clone https://github.com/boubinjg/SoftwarePilot.git |
| 83 | + |
| 84 | +#Set General environment variables |
| 85 | +ENV LC_ALL=C.UTF-8 \ |
| 86 | + LANG=C.UTF-8 \ |
| 87 | + GRADLE_HOME=/usr/local/gradle-4.4/bin \ |
| 88 | + AUAVHOME=/home/SoftwarePilot |
| 89 | +#Fix Path Variable |
| 90 | +ENV PATH=$PATH:$GRADLE_HOME \ JAVA_HOME=/usr/lib/jvm/java-8-oracle |
| 91 | + |
| 92 | +#Expose ports |
| 93 | +EXPOSE 12013 |
| 94 | +EXPOSE 5117 |
| 95 | + |
| 96 | +RUN apt-get update && \ |
| 97 | + apt-get install -y iputils-ping && \ |
| 98 | + apt-get install -y net-tools |
0 commit comments