Skip to content

Instantly share code, notes, and snippets.

@naxty
Created September 9, 2019 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naxty/a1e4eb21c55004e20243f829041f61b5 to your computer and use it in GitHub Desktop.
Save naxty/a1e4eb21c55004e20243f829041f61b5 to your computer and use it in GitHub Desktop.
Dockerfile for Seldon Core Python Wrapper
FROM python:3.7-slim
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN mkdir /app
WORKDIR /app
RUN mkdir model
COPY model/model.onnx model/model.onnx
COPY EmotionModel.py EmotionModel.py
EXPOSE 5000
# Define environment variable
ENV MODEL_NAME EmotionModel
ENV API_TYPE REST
ENV SERVICE_TYPE MODEL
ENV PERSISTENCE 0
CMD exec seldon-core-microservice $MODEL_NAME $API_TYPE --service-type $SERVICE_TYPE --persistence $PERSISTENCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment