Skip to content

Commit

Permalink
add Dockerfile (#1) (#3)
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
nicolecastillo committed Jun 7, 2020
1 parent e03f08a commit a0bee46
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions demo/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.7-slim-buster as base

RUN apt update && \
apt install -y cmake g++ && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY . /xlearn

# build from source (installs to /usr/local/lib/python3.7/site-packages/)
RUN cd /xlearn && \
ls -l && \
./build.sh && \
rm -r /xlearn

# install other library (installs to same site-packages path)
RUN pip install --no-cache-dir liblinear==2.11.2

# create an image without build dependencies
FROM python:3.7-slim-buster AS lib
ENV USER=root
COPY --from=base /usr/local/lib/python3.7/site-packages/* /usr/local/lib/python3.7/

0 comments on commit a0bee46

Please sign in to comment.