Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Gonzalez-Martin committed Sep 8, 2020
1 parent 3d8df90 commit 0ab6407
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env
pip-log.txt
pip-delete-this-directory.txt
.tox
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.log
.git
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.7-slim

ENV MODELS_DIR /mnt/models

RUN apt-get update && \
apt-get -y --no-install-recommends install \
libgomp1

WORKDIR /workspace
COPY setup.py .
# TODO: This busts the cache, which we don't want, but I can't see any
# way to install only deps from setup.py
COPY ./mlserver/ ./mlserver/
RUN pip install .[all]

COPY ./mlserver/ ./mlserver/

CMD mlserver start $MODELS_DIR

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
VERSION=0.1.0
IMAGE_NAME=seldonio/mlserver

install-dev:
pip install -r requirements-dev.txt
pip install --editable .[all]
Expand All @@ -9,6 +12,9 @@ run:
mlserver start \
./tests/testdata

build:
docker build . -t ${IMAGE_NAME}:${VERSION}

test:
tox

Expand Down

0 comments on commit 0ab6407

Please sign in to comment.