Skip to content

Commit

Permalink
Added missing python libs to worker docker image. Fixes #1197
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Jan 20, 2019
1 parent f65d9a2 commit 8cdafa2
Showing 1 changed file with 9 additions and 32 deletions.
41 changes: 9 additions & 32 deletions Dockerfile.worker
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
FROM gw000/keras
MAINTAINER Brian Broll <brian.broll@gmail.com>

# install nodejs v6
RUN apt-get update && apt-get install -y gnupg2 curl unzip && \
groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node

# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
; do \
(gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" \
|| gpg --keyserver keyserver.pgp.com --recv-keys "$key" \
|| gpg --keyserver pgp.mit.edu --recv-keys "$key") \
done

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.9.0

RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# Install the python dependencies
RUN pip install dill pillow matplotlib simplejson

# install nodejs v8
RUN apt-get update -yq \
&& apt-get install curl gnupg -yq \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash \
&& apt-get install nodejs -yq

# install deepforge
RUN echo '{"allow_root": true}' > /root/.bowerrc && mkdir -p /root/.config/configstore/ && \
Expand All @@ -47,6 +23,7 @@ RUN npm install --production
RUN ln -s /deepforge/bin/deepforge /usr/local/bin

# configure the worker
RUN apt-get install -y unzip
RUN deepforge config blob.dir /data/blob && \
deepforge config mongo.dir /data/db && \
deepforge config worker.cache.useBlob false && \
Expand Down

0 comments on commit 8cdafa2

Please sign in to comment.