-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
43 lines (34 loc) · 1.27 KB
/
Dockerfile
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
FROM ubuntu:18.04
ARG git_owner="singnet"
ARG git_repo="time-series-analysis"
ARG git_branch="master"
ARG snetd_version
ENV SINGNET_REPOS=/opt/singnet
ENV GENERIC_FOLDER=${SINGNET_REPOS}/${git_repo}/generic
ENV SERVICE_NAME=fbprophet-forecast
RUN mkdir -p ${SINGNET_REPOS}
RUN apt-get update && \
apt-get install -y apt-utils
RUN apt-get install -y \
build-essential \
python3 \
python3-pip \
python3-dev \
curl \
git \
wget \
nano
# Installing SNET Daemon
RUN SNETD_GIT_VERSION=`curl -s https://api.github.com/repos/singnet/snet-daemon/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")' || echo "v3.1.6"` && \
SNETD_VERSION=${snetd_version:-${SNETD_GIT_VERSION}} && \
cd /tmp && \
wget https://github.com/singnet/snet-daemon/releases/download/${SNETD_VERSION}/snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz && \
tar -xvf snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz && \
mv snet-daemon-${SNETD_VERSION}-linux-amd64/snetd /usr/bin/snetd
RUN cd ${SINGNET_REPOS} && \
git clone -b ${git_branch} https://github.com/${git_owner}/${git_repo}.git
RUN cd ${GENERIC_FOLDER}/${SERVICE_NAME} && \
pip3 install --upgrade pip && \
pip3 install -r requirements.txt && \
sh buildproto.sh
WORKDIR ${GENERIC_FOLDER}/${SERVICE_NAME}