-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (31 loc) · 1.52 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
FROM python:2.7
# Configure the working directory
RUN mkdir -p /opt/project
WORKDIR /opt/project
# Pin the version because pip>=10.0 does not support the --download flag which is required for dataflow
RUN pip install -U --ignore-installed pip==9.0.3
# Download and install google cloud. See the dockerfile at
# https://hub.docker.com/r/google/cloud-sdk/~/dockerfile/
RUN \
export CLOUD_SDK_APT_DEPS="curl gcc python-dev python-setuptools apt-transport-https lsb-release openssh-client git" && \
export CLOUD_SDK_PIP_DEPS="crcmod" && \
apt-get -qqy update && \
apt-get install -qqy $CLOUD_SDK_APT_DEPS && \
pip install -U $CLOUD_SDK_PIP_DEPS && \
export CLOUD_SDK_VERSION="184.0.0" && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" > /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update && \
apt-get install -y google-cloud-sdk=${CLOUD_SDK_VERSION}-0 && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_image
# Setup a volume for configuration and auth data
VOLUME ["/root/.config"]
# Setup local application dependencies
COPY . /opt/project
RUN pip install --process-dependency-links -e .
RUN pip install sklearn scipy
# Setup the entrypoint for quickly executing the sandviklines
#ENTRYPOINT ["scripts/run.sh"]