alonisser
(Alonisser)
January 4, 2019, 3:12pm
1
A sample of a cloud deployable dockerfile for prodigy I’ve made, If anyone is interested.
Based on alpine for a lean image
including replacing index.html, setting up instructions and using env vars for populating the prodigy.json file with db credentials
Dockerfile
FROM python:3.6-alpine
# Opted for alpine to get a lean docker image as possible
RUN apk add --no-cache openssl
ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
# Python deps for alpine
This file has been truncated. show original
prodigy.json.tpl
{
"batch_size": 5,
"host":"0.0.0.0",
"instructions":"/prodigy/instructions.txt",
"hide_meta": true,
"choice_auto_accept": true,
"db": "postgresql",
"db_settings": {
"postgresql": {
This file has been truncated. show original
3 Likes
ines
(Ines Montani)
January 4, 2019, 11:00pm
2
Thanks so much for sharing, this is cool! I definitely remember Docker usage coming up on the forum before, so this should be very useful for others
1 Like