forked from jfloff/pywFM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (24 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
29 lines (24 loc) · 1.04 KB
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
# Docker image to run pywFM examples
FROM jfloff/alpine-python:2.7
# install needed packages
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk add --no-cache --update gfortran \
openblas-dev@community \
&& \
rm /var/cache/apk/*
# Due to dependencies scipy and scikit-learn have to be in different commands
# Also due to that, we can't have a requirements.txt file
RUN pip install scipy numpy && \
pip install scikit-learn pandas && \
pip install pywFM
# clone repo and set envorinment variable to libfm PATH
RUN git clone https://github.com/srendle/libfm /home/libfm && \
cd /home/libfm/ && \
# taking advantage of a bug to allow us to save model #ShameShame
git reset --hard 91f8504a15120ef6815d6e10cc7dee42eebaab0f && \
make all
ENV LIBFM_PATH /home/libfm/bin/
# since we will be "always" mounting the volume, we can set this up
WORKDIR /home/pywfm
# start init script and bash right after
CMD /bin/bash